Skip to content

Commit 7ddf423

Browse files
committed
Remove deprecated ActiveRecord::ConnectionAdapters::SchemaCache#data_sources
1 parent 5667de1 commit 7ddf423

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

activerecord/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
* Remove deprecated `ActiveRecord::ConnectionAdapters::SchemaCache#data_sources`.
2+
3+
*Rafael Mendonça França*
4+
15
* Remove deprecated `ActiveRecord::ConnectionAdapters::SchemaCache.load_from`.
26

37
*Rafael Mendonça França*

activerecord/lib/active_record/connection_adapters/schema_cache.rb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def add(pool, name)
4343
end
4444

4545
def data_sources(pool, name)
46-
cache(pool).data_sources(pool, name)
46+
cache(pool).data_source_exists?(pool, name)
4747
end
4848

4949
def columns(pool, table_name)
@@ -334,11 +334,6 @@ def add(pool, table_name)
334334
end
335335
end
336336

337-
def data_sources(_connection, name) # :nodoc:
338-
@data_sources[name]
339-
end
340-
deprecate data_sources: :data_source_exists?, deprecator: ActiveRecord.deprecator
341-
342337
# Get the columns for a table
343338
def columns(pool, table_name)
344339
if ignored_table?(table_name)

guides/source/7_2_release_notes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ Please refer to the [Changelog][active-record] for detailed changes.
146146

147147
* Remove deprecated `ActiveRecord::ConnectionAdapters::SchemaCache.load_from`.
148148

149+
* Remove deprecated `ActiveRecord::ConnectionAdapters::SchemaCache#data_sources`.
150+
149151
### Deprecations
150152

151153
* Deprecate `Rails.application.config.active_record.allow_deprecated_singular_associations_name`

0 commit comments

Comments
 (0)