Skip to content

Commit 5667de1

Browse files
committed
Remove deprecated ActiveRecord::ConnectionAdapters::SchemaCache.load_from
1 parent 9391f0a commit 5667de1

File tree

3 files changed

+8
-14
lines changed

3 files changed

+8
-14
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.load_from`.
2+
3+
*Rafael Mendonça França*
4+
15
* Remove deprecated `#all_foreign_keys_valid?` from database adapters.
26

37
*Rafael Mendonça França*

activerecord/lib/active_record/connection_adapters/schema_cache.rb

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -225,18 +225,6 @@ def dump_to(filename)
225225

226226
# = Active Record Connection Adapters Schema Cache
227227
class SchemaCache
228-
class << self
229-
def new(connection)
230-
BoundSchemaReflection.new(SchemaReflection.new(nil), connection.pool)
231-
end
232-
deprecate new: "use ActiveRecord::ConnectionAdapters::SchemaReflection instead", deprecator: ActiveRecord.deprecator
233-
234-
def load_from(filename) # :nodoc:
235-
BoundSchemaReflection.new(SchemaReflection.new(filename), nil)
236-
end
237-
deprecate load_from: "use ActiveRecord::ConnectionAdapters::SchemaReflection instead", deprecator: ActiveRecord.deprecator
238-
end
239-
240228
def self._load_from(filename) # :nodoc:
241229
return unless File.file?(filename)
242230

@@ -264,7 +252,7 @@ def self.read(filename, &block)
264252
end
265253
private_class_method :read
266254

267-
def initialize
255+
def initialize # :nodoc:
268256
@columns = {}
269257
@columns_hash = {}
270258
@primary_keys = {}
@@ -290,7 +278,7 @@ def encode_with(coder) # :nodoc:
290278
coder["version"] = @version
291279
end
292280

293-
def init_with(coder)
281+
def init_with(coder) # :nodoc:
294282
@columns = coder["columns"]
295283
@columns_hash = coder["columns_hash"]
296284
@primary_keys = coder["primary_keys"]

guides/source/7_2_release_notes.md

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

145145
* Remove deprecated `#all_foreign_keys_valid?` from database adapters.
146146

147+
* Remove deprecated `ActiveRecord::ConnectionAdapters::SchemaCache.load_from`.
148+
147149
### Deprecations
148150

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

0 commit comments

Comments
 (0)