From 60440a68b13a5408cd9c492cc2eaed2e68f95bd7 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sun, 5 Mar 2017 20:28:03 +0900 Subject: Remove useless `Migrator.schema_migrations_table_name` Simply use `SchemaMigration.table_name` instead. --- .../active_record/connection_adapters/abstract/schema_statements.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord/lib/active_record/connection_adapters') diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb index c9dd915e98..cbb93e0ffe 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb @@ -996,7 +996,7 @@ module ActiveRecord end def insert_versions_sql(versions) # :nodoc: - sm_table = quote_table_name(ActiveRecord::Migrator.schema_migrations_table_name) + sm_table = quote_table_name(ActiveRecord::SchemaMigration.table_name) if versions.is_a?(Array) sql = "INSERT INTO #{sm_table} (version) VALUES\n" @@ -1025,7 +1025,7 @@ module ActiveRecord def assume_migrated_upto_version(version, migrations_paths) migrations_paths = Array(migrations_paths) version = version.to_i - sm_table = quote_table_name(ActiveRecord::Migrator.schema_migrations_table_name) + sm_table = quote_table_name(ActiveRecord::SchemaMigration.table_name) migrated = select_values("SELECT version FROM #{sm_table}").map(&:to_i) versions = ActiveRecord::Migrator.migration_files(migrations_paths).map do |file| -- cgit v1.2.3