Skip to content

Commit 0b08a40

Browse files
authored
Merge pull request rails#52749 from bernardobarreto/activerecord/fix-migration-log-message-for-down-operations
Fix migration log message when doing reverts
2 parents 56a9a0d + cdab538 commit 0b08a40

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
@@ -1538,7 +1538,8 @@ def execute_migration_in_transaction(migration)
15381538
return if down? && !migrated.include?(migration.version.to_i)
15391539
return if up? && migrated.include?(migration.version.to_i)
15401540

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

15431544
ddl_transaction(migration) do
15441545
migration.migrate(@direction)

0 commit comments

Comments
 (0)