mirror of
https://github.com/heartcombo/devise.git
synced 2026-01-08 22:37:57 -05:00
Remove MigrationContext deprecation in 7.1
DEPRECATION WARNING: SchemaMigration no longer inherits from ActiveRecord::Base. If you want to use the default connection, remove this argument. If you want to use a specific connection, instantiate MigrationContext with the connection's schema migration, for example `MigrationContext.new(path, Dog.connection.schema_migration)`.
This commit is contained in:
@@ -5,7 +5,9 @@ ActiveRecord::Base.logger = Logger.new(nil)
|
||||
ActiveRecord::Base.include_root_in_json = true
|
||||
|
||||
migrate_path = File.expand_path("../../rails_app/db/migrate/", __FILE__)
|
||||
if Devise::Test.rails6_and_up?
|
||||
if Devise::Test.rails71_and_up?
|
||||
ActiveRecord::MigrationContext.new(migrate_path).migrate
|
||||
elsif Devise::Test.rails6_and_up?
|
||||
ActiveRecord::MigrationContext.new(migrate_path, ActiveRecord::SchemaMigration).migrate
|
||||
elsif Devise::Test.rails52_and_up?
|
||||
ActiveRecord::MigrationContext.new(migrate_path).migrate
|
||||
|
||||
Reference in New Issue
Block a user