mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Remove deprecated String constructor from ActiveRecord::Migrator
.
This commit is contained in:
parent
c95911023c
commit
685631285f
3 changed files with 4 additions and 9 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
* Remove deprecated String constructor from `ActiveRecord::Migrator`.
|
||||||
|
|
||||||
|
*Yves Senn*
|
||||||
|
|
||||||
* Remove deprecated `scope` use without passing a callable object.
|
* Remove deprecated `scope` use without passing a callable object.
|
||||||
|
|
||||||
*Arun Agrawal*
|
*Arun Agrawal*
|
||||||
|
|
|
@ -869,9 +869,6 @@ module ActiveRecord
|
||||||
|
|
||||||
if Array(migrations).grep(String).empty?
|
if Array(migrations).grep(String).empty?
|
||||||
@migrations = migrations
|
@migrations = migrations
|
||||||
else
|
|
||||||
ActiveSupport::Deprecation.warn "instantiate this class with a list of migrations"
|
|
||||||
@migrations = self.class.migrations(migrations)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
validate(@migrations)
|
validate(@migrations)
|
||||||
|
|
|
@ -91,12 +91,6 @@ module ActiveRecord
|
||||||
assert_equal 'AddExpressions', migrations[0].name
|
assert_equal 'AddExpressions', migrations[0].name
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_deprecated_constructor
|
|
||||||
assert_deprecated do
|
|
||||||
ActiveRecord::Migrator.new(:up, MIGRATIONS_ROOT + "/valid")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_relative_migrations
|
def test_relative_migrations
|
||||||
list = Dir.chdir(MIGRATIONS_ROOT) do
|
list = Dir.chdir(MIGRATIONS_ROOT) do
|
||||||
ActiveRecord::Migrator.migrations("valid/")
|
ActiveRecord::Migrator.migrations("valid/")
|
||||||
|
|
Loading…
Reference in a new issue