Fixes database migration.