Fixes migrations to work from an empty db and from empty.sql as well -