Defect #32939 » plugin.rb.patch
plugin.rb (working copy) | ||
---|---|---|
507 | 507 |
else |
508 | 508 |
migrations |
509 | 509 |
end |
510 |
Migrator.new(:up, selected_migrations, target_version).migrate |
|
510 |
Migrator.new(:up, selected_migrations, schema_migration, target_version).migrate
|
|
511 | 511 |
end |
512 | 512 | |
513 | 513 |
def down(target_version = nil) |
... | ... | |
517 | 517 |
else |
518 | 518 |
migrations |
519 | 519 |
end |
520 |
Migrator.new(:down, selected_migrations, target_version).migrate |
|
520 |
Migrator.new(:down, selected_migrations, schema_migration, target_version).migrate
|
|
521 | 521 |
end |
522 | 522 | |
523 | 523 |
def run(direction, target_version) |
524 |
Migrator.new(direction, migrations, target_version).run |
|
524 |
Migrator.new(direction, migrations, schema_migration, target_version).run
|
|
525 | 525 |
end |
526 | 526 | |
527 | 527 |
def open |
528 |
Migrator.new(:up, migrations, nil)
|
|
528 |
Migrator.new(:up, migrations, schema_migration)
|
|
529 | 529 |
end |
530 | 530 |
end |
531 | 531 | |
... | ... | |
539 | 539 |
self.current_plugin = plugin |
540 | 540 |
return if current_version(plugin) == version |
541 | 541 | |
542 |
MigrationContext.new(plugin.migration_directory).migrate(version) |
|
542 |
MigrationContext.new(plugin.migration_directory, ::ActiveRecord::Base.connection.schema_migration).migrate(version)
|
|
543 | 543 |
end |
544 | 544 | |
545 | 545 |
def get_all_versions(plugin = current_plugin) |