From f2099361da05dd6890c733e5aecdce4cd52efdff Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sun, 20 Aug 2017 23:31:34 +0900 Subject: Remove deprecated `#migration_keys` --- activerecord/CHANGELOG.md | 4 ++++ .../lib/active_record/connection_adapters/abstract/schema_dumper.rb | 6 ------ .../lib/active_record/connection_adapters/mysql/schema_dumper.rb | 4 ---- .../active_record/connection_adapters/postgresql/schema_dumper.rb | 5 ----- activerecord/test/cases/migration_test.rb | 4 ---- 5 files changed, 4 insertions(+), 19 deletions(-) diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 4a840a57b5..1a1a3a8092 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,7 @@ +* Remove deprecated `#migration_keys`. + + *Ryuta Kamizono* + * Automatically guess the inverse associations for STI. *Yuichiro Kaneko* diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_dumper.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_dumper.rb index f17f1d35e2..cd58365b3d 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_dumper.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_dumper.rb @@ -22,12 +22,6 @@ module ActiveRecord spec end - # Lists the valid migration options - def migration_keys # :nodoc: - column_options_keys - end - deprecate :migration_keys - private def prepare_column_options(column) spec = {} diff --git a/activerecord/lib/active_record/connection_adapters/mysql/schema_dumper.rb b/activerecord/lib/active_record/connection_adapters/mysql/schema_dumper.rb index 81f7dce562..d5198a6dba 100644 --- a/activerecord/lib/active_record/connection_adapters/mysql/schema_dumper.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql/schema_dumper.rb @@ -4,10 +4,6 @@ module ActiveRecord module ConnectionAdapters module MySQL module ColumnDumper # :nodoc: - def migration_keys - super + [:unsigned] - end - private def prepare_column_options(column) spec = super diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/schema_dumper.rb b/activerecord/lib/active_record/connection_adapters/postgresql/schema_dumper.rb index 5031605c2a..14394bbaf5 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/schema_dumper.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/schema_dumper.rb @@ -4,11 +4,6 @@ module ActiveRecord module ConnectionAdapters module PostgreSQL module ColumnDumper # :nodoc: - # Adds +:array+ as a valid migration key - def migration_keys - super + [:array] - end - private def prepare_column_options(column) spec = super diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb index 0fa43583ac..07afa89779 100644 --- a/activerecord/test/cases/migration_test.rb +++ b/activerecord/test/cases/migration_test.rb @@ -1112,10 +1112,6 @@ class CopyMigrationsTest < ActiveRecord::TestCase assert_deprecated { ActiveRecord::Base.connection.initialize_internal_metadata_table } end - def test_deprecate_migration_keys - assert_deprecated { ActiveRecord::Base.connection.migration_keys } - end - def test_deprecate_supports_migrations assert_deprecated { ActiveRecord::Base.connection.supports_migrations? } end -- cgit v1.2.3