Skip to content

Commit cdab538

Browse files
Fix migration log message for down operations
1 parent 35bfb52 commit cdab538

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

activerecord/lib/active_record/migration.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1536,7 +1536,8 @@ def execute_migration_in_transaction(migration)
15361536
return if down? && !migrated.include?(migration.version.to_i)
15371537
return if up? && migrated.include?(migration.version.to_i)
15381538

1539-
Base.logger.info "Migrating to #{migration.name} (#{migration.version})" if Base.logger
1539+
message = up? ? "Migrating to" : "Reverting"
1540+
Base.logger.info "#{message} #{migration.name} (#{migration.version})" if Base.logger
15401541

15411542
ddl_transaction(migration) do
15421543
migration.migrate(@direction)

0 commit comments

Comments
 (0)