finish database migration.