Properly migrate database.