diff options
-rw-r--r-- | activerecord/lib/active_record/migration/compatibility.rb | 2 | ||||
-rw-r--r-- | activerecord/test/cases/migration/compatibility_test.rb | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/migration/compatibility.rb b/activerecord/lib/active_record/migration/compatibility.rb index 2b247f7a7a..c979aaf0a0 100644 --- a/activerecord/lib/active_record/migration/compatibility.rb +++ b/activerecord/lib/active_record/migration/compatibility.rb @@ -171,7 +171,7 @@ module ActiveRecord class << t prepend TableDefinition end - t + super end def index_name_for_remove(table_name, options = {}) diff --git a/activerecord/test/cases/migration/compatibility_test.rb b/activerecord/test/cases/migration/compatibility_test.rb index 1ae15eb439..b50d68d6df 100644 --- a/activerecord/test/cases/migration/compatibility_test.rb +++ b/activerecord/test/cases/migration/compatibility_test.rb @@ -71,6 +71,9 @@ module ActiveRecord assert_not connection.index_exists?(:more_testings, :foo_id) assert_not connection.index_exists?(:more_testings, :bar_id) + + legacy_ref = connection.columns(:more_testings).find { |c| c.name == "foo_id" } + assert_not legacy_ref.bigint? ensure connection.drop_table :more_testings rescue nil end |