Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed. down migration of
rename_table
is failed if migration versio…
…n less than 7.1 ``` StandardError: An error has occurred, this and all later migrations canceled: wrong number of arguments (given 3, expected 2) # ./vendor/bundle/ruby/3.2.0/gems/activerecord-7.1.0/lib/active_record/migration/compatibility.rb:105:in `rename_table' # ./vendor/bundle/ruby/3.2.0/gems/activerecord-7.1.0/lib/active_record/migration/command_recorder.rb:146:in `block in replay' # ./vendor/bundle/ruby/3.2.0/gems/activerecord-7.1.0/lib/active_record/migration/command_recorder.rb:145:in `each' # ./vendor/bundle/ruby/3.2.0/gems/activerecord-7.1.0/lib/active_record/migration/command_recorder.rb:145:in `replay' # ./vendor/bundle/ruby/3.2.0/gems/activerecord-7.1.0/lib/active_record/migration.rb:855:in `revert' # ./vendor/bundle/ruby/3.2.0/gems/activerecord-7.1.0/lib/active_record/migration.rb:980:in `exec_migration' # ./vendor/bundle/ruby/3.2.0/gems/activerecord-7.1.0/lib/active_record/migration.rb:966:in `block (2 levels) in migrate' # ./vendor/bundle/ruby/3.2.0/gems/activerecord-7.1.0/lib/active_record/migration.rb:965:in `block in migrate' # ./vendor/bundle/ruby/3.2.0/gems/activerecord-7.1.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:229:in `with_connection' # ./vendor/bundle/ruby/3.2.0/gems/activerecord-7.1.0/lib/active_record/migration.rb:964:in `migrate' # ./vendor/bundle/ruby/3.2.0/gems/activerecord-7.1.0/lib/active_record/migration.rb:1174:in `migrate' # ./vendor/bundle/ruby/3.2.0/gems/activerecord-7.1.0/lib/active_record/migration.rb:1525:in `block in execute_migration_in_transaction' # ./vendor/bundle/ruby/3.2.0/gems/activerecord-7.1.0/lib/active_record/connection_adapters/abstract/transaction.rb:535:in `block in within_new_transaction' # ./vendor/bundle/ruby/3.2.0/gems/activesupport-7.1.0/lib/active_support/concurrency/null_lock.rb:9:in `synchronize' # ./vendor/bundle/ruby/3.2.0/gems/activerecord-7.1.0/lib/active_record/connection_adapters/abstract/transaction.rb:532:in `within_new_transaction' # ./vendor/bundle/ruby/3.2.0/gems/activerecord-7.1.0/lib/active_record/connection_adapters/abstract/database_statements.rb:342:in `transaction' # ./vendor/bundle/ruby/3.2.0/gems/activerecord-7.1.0/lib/active_record/migration.rb:1576:in `ddl_transaction' # ./vendor/bundle/ruby/3.2.0/gems/activerecord-7.1.0/lib/active_record/migration.rb:1524:in `execute_migration_in_transaction' # ./vendor/bundle/ruby/3.2.0/gems/activerecord-7.1.0/lib/active_record/migration.rb:1499:in `each' # ./vendor/bundle/ruby/3.2.0/gems/activerecord-7.1.0/lib/active_record/migration.rb:1499:in `migrate_without_lock' # ./vendor/bundle/ruby/3.2.0/gems/activerecord-7.1.0/lib/active_record/migration.rb:1446:in `migrate' # ./vendor/bundle/ruby/3.2.0/gems/activerecord-7.1.0/lib/active_record/migration.rb:1280:in `down' # ./spec/db/setup.rb:47:in `down_migrate' # ./spec/support/contexts/setup_databse.rb:8:in `block (2 levels) in <top (required)>' # ------------------ # --- Caused by: --- # ArgumentError: # wrong number of arguments (given 3, expected 2) # ./vendor/bundle/ruby/3.2.0/gems/activerecord-7.1.0/lib/active_record/migration/compatibility.rb:105:in `rename_table' ```
- Loading branch information