提交 f8d9a519 编写于 作者: A Akira Matsuda

Don't allow AR::Tasks::DatabaseTasks.migrate to mutate Migration.verbose value

This fixes random test failure in migrator_test.rb
上级 4606e752
......@@ -131,10 +131,12 @@ def migrate
verbose = ENV["VERBOSE"] ? ENV["VERBOSE"] == "true" : true
version = ENV["VERSION"] ? ENV["VERSION"].to_i : nil
scope = ENV['SCOPE']
Migration.verbose = verbose
verbose_was = Migration.verbose
Migrator.migrate(Migrator.migrations_paths, version) do |migration|
scope.blank? || scope == migration.scope
end
ensure
Migration.verbose = verbose_was
end
def charset_current(environment = env)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册