refactored database_migration generator