Commit 3a29646d authored by Grzegorz Bizon's avatar Grzegorz Bizon

Disable migrations output in migrations helpers

parent 56d24bcf
......@@ -36,16 +36,30 @@ module MigrationsHelpers
end
def schema_migrate_down!
ActiveRecord::Migrator
.migrate(migrations_paths, migration_schema_version)
disable_migrations_output do
ActiveRecord::Migrator.migrate(migrations_paths,
migration_schema_version)
end
reset_column_in_migration_models
end
def schema_migrate_up!
ActiveRecord::Migrator.migrate(migrations_paths)
disable_migrations_output do
ActiveRecord::Migrator.migrate(migrations_paths)
end
reset_column_in_migration_models
end
def disable_migrations_output
ActiveRecord::Migration.verbose = false
yield
ensure
ActiveRecord::Migration.verbose = true
end
def migrate!
ActiveRecord::Migrator.up(migrations_paths) do |migration|
migration.name == described_class.name
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment