Class: Redmine::Plugin::MigrationContext
- Inherits:
-
ActiveRecord::MigrationContext
- Object
- ActiveRecord::MigrationContext
- Redmine::Plugin::MigrationContext
- Defined in:
- lib/redmine/plugin.rb
Overview
Instance Method Summary collapse
- #down(target_version = nil) ⇒ Object
- #open ⇒ Object
- #run(direction, target_version) ⇒ Object
- #up(target_version = nil) ⇒ Object
Instance Method Details
#down(target_version = nil) ⇒ Object
501 502 503 504 505 506 507 508 509 |
# File 'lib/redmine/plugin.rb', line 501 def down(target_version = nil) selected_migrations = if block_given? migrations.select { |m| yield m } else migrations end Migrator.new(:down, selected_migrations, target_version).migrate end |
#open ⇒ Object
515 516 517 |
# File 'lib/redmine/plugin.rb', line 515 def open Migrator.new(:up, migrations, nil) end |