aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/CHANGELOG.md4
-rw-r--r--activerecord/lib/active_record/migration.rb5
-rw-r--r--activerecord/test/cases/migration_test.rb4
3 files changed, 13 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index e00a62b8cd..f87fbb0fb2 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,3 +1,7 @@
+* Deprecate `Migrator.schema_migrations_table_name`.
+
+ *Ryuta Kamizono*
+
* Check whether `Rails.application` defined before calling it
In #27674 we changed the migration generator to generate migrations at the
diff --git a/activerecord/lib/active_record/migration.rb b/activerecord/lib/active_record/migration.rb
index 3eb9171a5f..4e1df1432c 100644
--- a/activerecord/lib/active_record/migration.rb
+++ b/activerecord/lib/active_record/migration.rb
@@ -1022,6 +1022,11 @@ module ActiveRecord
new(:up, migrations(migrations_paths), nil)
end
+ def schema_migrations_table_name
+ SchemaMigration.table_name
+ end
+ deprecate :schema_migrations_table_name
+
def get_all_versions(connection = Base.connection)
if SchemaMigration.table_exists?
SchemaMigration.all_versions.map(&:to_i)
diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb
index 744fa865be..da7875187a 100644
--- a/activerecord/test/cases/migration_test.rb
+++ b/activerecord/test/cases/migration_test.rb
@@ -1146,4 +1146,8 @@ class CopyMigrationsTest < ActiveRecord::TestCase
def test_deprecate_supports_migrations
assert_deprecated { ActiveRecord::Base.connection.supports_migrations? }
end
+
+ def test_deprecate_schema_migrations_table_name
+ assert_deprecated { ActiveRecord::Migrator.schema_migrations_table_name }
+ end
end