Skip to content
Permalink
Browse files
Remove deprecated ActiveRecord::Migrator.migrations_path=
  • Loading branch information
rafaelfranca committed Jan 17, 2019
1 parent 27b252d commit 90d7842186591cae364fab3320b524e4d31a7d7d
@@ -1,3 +1,7 @@
* Remove deprecated `ActiveRecord::Migrator.migrations_path=`.

*Rafael Mendonça França*

* Remove deprecated `expand_hash_conditions_for_aggregates`.

*Rafael Mendonça França*
@@ -1169,13 +1169,6 @@ class Migrator # :nodoc:
class << self
attr_accessor :migrations_paths

def migrations_path=(path)
ActiveSupport::Deprecation.warn \
"`ActiveRecord::Migrator.migrations_path=` is now deprecated and will be removed in Rails 6.0. " \
"You can set the `migrations_paths` on the `connection` instead through the `database.yml`."
self.migrations_paths = [path]
end

# For cases where a table doesn't exist like loading from schema cache
def current_version
MigrationContext.new(migrations_paths).current_version
@@ -78,16 +78,6 @@ def test_passing_migrations_paths_to_assume_migrated_upto_version_is_deprecated
end
end

def test_migrator_migrations_path_is_deprecated
assert_deprecated do
ActiveRecord::Migrator.migrations_path = "/whatever"
end
ensure
assert_deprecated do
ActiveRecord::Migrator.migrations_path = "db/migrate"
end
end

def test_migration_version_matches_component_version
assert_equal ActiveRecord::VERSION::STRING.to_f, ActiveRecord::Migration.current_version
end

0 comments on commit 90d7842

Please sign in to comment.