From f223f707da62dce350f760fa04f870fd9ce0274a Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Thu, 1 Apr 2021 15:02:47 +0000 Subject: [PATCH] Fix "ArgumentError: wrong number of arguments (given 1, expected 2) on Redmine::PluginTest#test_migrate_redmine_plugin" (#29914, #32939). MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Patch by Pavel Rosický. git-svn-id: http://svn.redmine.org/redmine/trunk@20888 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/plugin.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/redmine/plugin.rb b/lib/redmine/plugin.rb index 0f20a1993..48d04dcac 100644 --- a/lib/redmine/plugin.rb +++ b/lib/redmine/plugin.rb @@ -539,7 +539,7 @@ module Redmine else migrations end - Migrator.new(:up, selected_migrations, target_version).migrate + Migrator.new(:up, selected_migrations, schema_migration, target_version).migrate end def down(target_version = nil) @@ -549,15 +549,15 @@ module Redmine else migrations end - Migrator.new(:down, selected_migrations, target_version).migrate + Migrator.new(:down, selected_migrations, schema_migration, target_version).migrate end def run(direction, target_version) - Migrator.new(direction, migrations, target_version).run + Migrator.new(direction, migrations, schema_migration, target_version).run end def open - Migrator.new(:up, migrations, nil) + Migrator.new(:up, migrations, schema_migration) end end @@ -571,7 +571,7 @@ module Redmine self.current_plugin = plugin return if current_version(plugin) == version - MigrationContext.new(plugin.migration_directory).migrate(version) + MigrationContext.new(plugin.migration_directory, ::ActiveRecord::Base.connection.schema_migration).migrate(version) end def get_all_versions(plugin = current_plugin) -- 2.39.5