mirror of
https://github.com/DatabaseCleaner/database_cleaner
synced 2023-03-27 23:22:03 -04:00
deprecate non-functional :reset_ids option in ActiveRecord truncation strategy.
This commit is contained in:
parent
80b0ea6934
commit
05351da7a3
2 changed files with 9 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
|||
|
||||
== Deprecations
|
||||
* Deprecate all #orm= setter methods: https://github.com/DatabaseCleaner/database_cleaner/pull/643
|
||||
* Deprecate non-functional :reset_ids option in ActiveRecord truncation strategy: https://github.com/DatabaseCleaner/database_cleaner/issues/559
|
||||
|
||||
== Bugfixes
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
require 'active_record/base'
|
||||
require 'database_cleaner/active_record/base'
|
||||
require 'active_record/connection_adapters/abstract_adapter'
|
||||
require 'database_cleaner/deprecation'
|
||||
|
||||
#Load available connection adapters
|
||||
%w(
|
||||
|
@ -233,6 +234,13 @@ module DatabaseCleaner::ActiveRecord
|
|||
include ::DatabaseCleaner::ActiveRecord::Base
|
||||
include ::DatabaseCleaner::Generic::Truncation
|
||||
|
||||
def initialize(*)
|
||||
super
|
||||
if !@reset_ids.nil?
|
||||
DatabaseCleaner.deprecate "The `:reset_ids` option for the ActiveRecord truncation strategy has no effect, and is deprecated. It will be removed in database_cleaner 2.0 with no replacement."
|
||||
end
|
||||
end
|
||||
|
||||
def clean
|
||||
connection = connection_class.connection
|
||||
connection.disable_referential_integrity do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue