diff options
| -rw-r--r-- | activerecord/CHANGELOG.md | 5 | ||||
| -rw-r--r-- | activerecord/lib/active_record/connection_adapters/schema_cache.rb | 36 | 
2 files changed, 13 insertions, 28 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index ea40952be0..f59f79112e 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,8 @@ +*   Remove deprecated nil-passing to the following `SchemaCache` methods: +    `primary_keys`, `tables`, `columns` and `columns_hash`. + +    *Yves Senn* +  *   Remove deprecated block filter from `ActiveRecord::Migrator#migrate`.      *Yves Senn* diff --git a/activerecord/lib/active_record/connection_adapters/schema_cache.rb b/activerecord/lib/active_record/connection_adapters/schema_cache.rb index 1d7a22e831..88d82eabaa 100644 --- a/activerecord/lib/active_record/connection_adapters/schema_cache.rb +++ b/activerecord/lib/active_record/connection_adapters/schema_cache.rb @@ -16,13 +16,8 @@ module ActiveRecord          prepare_default_proc        end -      def primary_keys(table_name = nil) -        if table_name -          @primary_keys[table_name] -        else -          ActiveSupport::Deprecation.warn('call primary_keys with a table name!') -          @primary_keys.dup -        end +      def primary_keys(table_name) +        @primary_keys[table_name]        end        # A cached lookup for table existence. @@ -41,34 +36,19 @@ module ActiveRecord          end        end -      def tables(name = nil) -        if name -          @tables[name] -        else -          ActiveSupport::Deprecation.warn('call tables with a name!') -          @tables.dup -        end +      def tables(name) +        @tables[name]        end        # Get the columns for a table -      def columns(table = nil) -        if table -          @columns[table] -        else -          ActiveSupport::Deprecation.warn('call columns with a table name!') -          @columns.dup -        end +      def columns(table) +        @columns[table]        end        # Get the columns for a table as a hash, key is the column name        # value is the column object. -      def columns_hash(table = nil) -        if table -          @columns_hash[table] -        else -          ActiveSupport::Deprecation.warn('call columns_hash with a table name!') -          @columns_hash.dup -        end +      def columns_hash(table) +        @columns_hash[table]        end        # Clears out internal caches  | 
