Remove deprecated `migrations_path` argument in `ActiveRecord::ConnectionAdapter::SchemaStatements#assume_migrated_upto_version`

This commit is contained in:
Rafael Mendonça França 2020-05-07 12:32:44 -04:00
parent 67b4746c16
commit 43591b43a6
No known key found for this signature in database
GPG Key ID: FC23B6D0F1EEE948
4 changed files with 8 additions and 14 deletions

View File

@ -1,3 +1,7 @@
* Remove deprecated `migrations_path` argument in `ActiveRecord::ConnectionAdapter::SchemaStatements#assume_migrated_upto_version`.
*Rafael Mendonça França*
* Remove deprecated `config.active_record.sqlite3.represent_boolean_as_integer`.
*Rafael Mendonça França*

View File

@ -1190,13 +1190,7 @@ module ActiveRecord
{ primary_key: true }
end
def assume_migrated_upto_version(version, migrations_paths = nil)
unless migrations_paths.nil?
ActiveSupport::Deprecation.warn(<<~MSG.squish)
Passing migrations_paths to #assume_migrated_upto_version is deprecated and will be removed in Rails 6.1.
MSG
end
def assume_migrated_upto_version(version)
version = version.to_i
sm_table = quote_table_name(schema_migration.table_name)

View File

@ -72,13 +72,6 @@ class MigrationTest < ActiveRecord::TestCase
ActiveRecord::Migration.verbose = @verbose_was
end
def test_passing_migrations_paths_to_assume_migrated_upto_version_is_deprecated
ActiveRecord::SchemaMigration.create_table
assert_deprecated do
ActiveRecord::Base.connection.assume_migrated_upto_version(0, [])
end
end
def test_migration_version_matches_component_version
assert_equal ActiveRecord::VERSION::STRING.to_f, ActiveRecord::Migration.current_version
end

View File

@ -149,6 +149,9 @@ Please refer to the [Changelog][active-record] for detailed changes.
### Removals
* Remove deprecated `migrations_path` argument in
`ActiveRecord::ConnectionAdapter::SchemaStatements#assume_migrated_upto_version`.
* Remove deprecated `config.active_record.sqlite3.represent_boolean_as_integer`.
* Remove deprecated methods from `ActiveRecord::DatabaseConfigurations`.