diff options
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/tasks/database_tasks.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/activerecord/lib/active_record/tasks/database_tasks.rb b/activerecord/lib/active_record/tasks/database_tasks.rb index d8e0cd1e30..af1bbc7e93 100644 --- a/activerecord/lib/active_record/tasks/database_tasks.rb +++ b/activerecord/lib/active_record/tasks/database_tasks.rb @@ -163,16 +163,11 @@ module ActiveRecord } end - def verbose? - ENV["VERBOSE"] ? ENV["VERBOSE"] != "false" : true - end - def migrate check_target_version - verbose = verbose? scope = ENV["SCOPE"] - verbose_was, Migration.verbose = Migration.verbose, verbose + verbose_was, Migration.verbose = Migration.verbose, verbose? Base.connection.migration_context.migrate(target_version) do |migration| scope.blank? || scope == migration.scope end @@ -301,6 +296,9 @@ module ActiveRecord end private + def verbose? + ENV["VERBOSE"] ? ENV["VERBOSE"] != "false" : true + end def class_for_adapter(adapter) _key, task = @tasks.each_pair.detect { |pattern, _task| adapter[pattern] } |