Skip to content

Commit 90d7842

Browse files
committed
Remove deprecated ActiveRecord::Migrator.migrations_path=
1 parent 27b252d commit 90d7842

File tree

3 files changed

+4
-17
lines changed

3 files changed

+4
-17
lines changed

activerecord/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
* Remove deprecated `ActiveRecord::Migrator.migrations_path=`.
2+
3+
*Rafael Mendonça França*
4+
15
* Remove deprecated `expand_hash_conditions_for_aggregates`.
26

37
*Rafael Mendonça França*

activerecord/lib/active_record/migration.rb

-7
Original file line numberDiff line numberDiff line change
@@ -1169,13 +1169,6 @@ class Migrator # :nodoc:
11691169
class << self
11701170
attr_accessor :migrations_paths
11711171

1172-
def migrations_path=(path)
1173-
ActiveSupport::Deprecation.warn \
1174-
"`ActiveRecord::Migrator.migrations_path=` is now deprecated and will be removed in Rails 6.0. " \
1175-
"You can set the `migrations_paths` on the `connection` instead through the `database.yml`."
1176-
self.migrations_paths = [path]
1177-
end
1178-
11791172
# For cases where a table doesn't exist like loading from schema cache
11801173
def current_version
11811174
MigrationContext.new(migrations_paths).current_version

activerecord/test/cases/migration_test.rb

-10
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,6 @@ def test_passing_migrations_paths_to_assume_migrated_upto_version_is_deprecated
7878
end
7979
end
8080

81-
def test_migrator_migrations_path_is_deprecated
82-
assert_deprecated do
83-
ActiveRecord::Migrator.migrations_path = "/whatever"
84-
end
85-
ensure
86-
assert_deprecated do
87-
ActiveRecord::Migrator.migrations_path = "db/migrate"
88-
end
89-
end
90-
9181
def test_migration_version_matches_component_version
9282
assert_equal ActiveRecord::VERSION::STRING.to_f, ActiveRecord::Migration.current_version
9383
end

0 commit comments

Comments
 (0)