Fix empty db and no revision