DEV: `check_pending` -> `check_all_pending!` (#27724)

Fixes the following deprecation warning:

> DEPRECATION WARNING: The `check_pending!` method is deprecated in favor of `check_all_pending!`. The new implementation will loop through all available database configurations and find pending migrations. The prior implementation did not permit this.
This commit is contained in:
Alan Guo Xiang Tan 2024-07-05 09:29:32 +08:00 committed by GitHub
parent bcd014c99d
commit d8e7fc4f5d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 5 deletions

View File

@ -124,15 +124,11 @@ module TurboTests
ActiveRecord::Tasks::DatabaseTasks.migrations_paths = %w[db/migrate db/post_migrate]
conn = ActiveRecord::Base.establish_connection(config).connection
begin
ActiveRecord::Migration.check_pending!(conn)
ActiveRecord::Migration.check_all_pending!
rescue ActiveRecord::PendingMigrationError
puts "There are pending migrations, run rake parallel:migrate"
exit 1
ensure
conn.close
end
end