minor refactoring of accessing the database name in MigrationHelper