From 0e41e2cd8ea825479fdaf181a9518280b8fccc20 Mon Sep 17 00:00:00 2001 From: Takumi Shotoku Date: Thu, 17 Aug 2023 16:33:24 +0900 Subject: [PATCH] Fix method name to `check_all_pending!` The method added in 03379d1f59 is `check_all_pending!`, not `check_pending_migrations!`. --- activerecord/CHANGELOG.md | 4 ++-- activerecord/lib/active_record/migration.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index c9a4a6684f..de83478b77 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -283,9 +283,9 @@ *Jean Boussier* -* Deprecate `check_pending!` in favor of `check_pending_migrations!`. +* Deprecate `check_pending!` in favor of `check_all_pending!`. - `check_pending!` will only check for pending migrations on the current database connection or the one passed in. This has been deprecated in favor of `check_pending_migrations!` which will find all pending migrations for the database configurations in a given environment. + `check_pending!` will only check for pending migrations on the current database connection or the one passed in. This has been deprecated in favor of `check_all_pending!` which will find all pending migrations for the database configurations in a given environment. *Eileen M. Uchitelle* diff --git a/activerecord/lib/active_record/migration.rb b/activerecord/lib/active_record/migration.rb index 20134f1c85..3978690960 100644 --- a/activerecord/lib/active_record/migration.rb +++ b/activerecord/lib/active_record/migration.rb @@ -644,10 +644,10 @@ def nearest_delegate # :nodoc: # Raises ActiveRecord::PendingMigrationError error if any migrations are pending. # - # This is deprecated in favor of +check_pending_migrations!+ + # This is deprecated in favor of +check_all_pending!+ def check_pending!(connection = ActiveRecord::Tasks::DatabaseTasks.migration_connection) ActiveRecord.deprecator.warn(<<-MSG.squish) - The `check_pending!` method is deprecated in favor of `check_pending_migrations!`. The + 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. MSG