some fixes to allow migration and seeding from scratch