And refactor the migration setup to be much cleaner