mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Remove deprecated config.active_record.sqlite3.represent_boolean_as_integer
This commit is contained in:
parent
255a7ef7b0
commit
67b4746c16
4 changed files with 6 additions and 23 deletions
|
@ -1,3 +1,7 @@
|
|||
* Remove deprecated `config.active_record.sqlite3.represent_boolean_as_integer`.
|
||||
|
||||
*Rafael Mendonça França*
|
||||
|
||||
* `relation.create` does no longer leak scope to class level querying methods
|
||||
in initialization block and callbacks.
|
||||
|
||||
|
|
|
@ -76,16 +76,6 @@ module ActiveRecord
|
|||
json: { name: "json" },
|
||||
}
|
||||
|
||||
def self.represent_boolean_as_integer=(value) # :nodoc:
|
||||
if value == false
|
||||
raise "`.represent_boolean_as_integer=` is now always true, so make sure your application can work with it and remove this settings."
|
||||
end
|
||||
|
||||
ActiveSupport::Deprecation.warn(
|
||||
"`.represent_boolean_as_integer=` is now always true, so setting this is deprecated and will be removed in Rails 6.1."
|
||||
)
|
||||
end
|
||||
|
||||
class StatementPool < ConnectionAdapters::StatementPool # :nodoc:
|
||||
private
|
||||
def dealloc(stmt)
|
||||
|
|
|
@ -31,9 +31,6 @@ module ActiveRecord
|
|||
config.active_record.maintain_test_schema = true
|
||||
config.active_record.has_many_inversing = false
|
||||
|
||||
config.active_record.sqlite3 = ActiveSupport::OrderedOptions.new
|
||||
config.active_record.sqlite3.represent_boolean_as_integer = nil
|
||||
|
||||
config.active_record.queues = ActiveSupport::InheritableOptions.new(destroy: :active_record_destroy)
|
||||
|
||||
config.eager_load_namespaces << ActiveRecord
|
||||
|
@ -208,16 +205,6 @@ To keep using the current cache store, you can turn off cache versioning entirel
|
|||
ActiveSupport.on_load(:active_record) do
|
||||
configs = app.config.active_record
|
||||
|
||||
represent_boolean_as_integer = configs.sqlite3.delete(:represent_boolean_as_integer)
|
||||
|
||||
unless represent_boolean_as_integer.nil?
|
||||
ActiveSupport.on_load(:active_record_sqlite3adapter) do
|
||||
ActiveRecord::ConnectionAdapters::SQLite3Adapter.represent_boolean_as_integer = represent_boolean_as_integer
|
||||
end
|
||||
end
|
||||
|
||||
configs.delete(:sqlite3)
|
||||
|
||||
configs.each do |k, v|
|
||||
send "#{k}=", v
|
||||
end
|
||||
|
|
|
@ -149,6 +149,8 @@ Please refer to the [Changelog][active-record] for detailed changes.
|
|||
|
||||
### Removals
|
||||
|
||||
* Remove deprecated `config.active_record.sqlite3.represent_boolean_as_integer`.
|
||||
|
||||
* Remove deprecated methods from `ActiveRecord::DatabaseConfigurations`.
|
||||
|
||||
`fetch`
|
||||
|
|
Loading…
Reference in a new issue