0009-Fix-ArgumentError-wrong-number-of-arguments-given-1-.patch

Marius BALTEANU, 2021-03-30 18:41

Download (1.86 KB)

View differences:

lib/redmine/plugin.rb
539 539
          else
540 540
            migrations
541 541
          end
542
        Migrator.new(:up, selected_migrations, target_version).migrate
542
        Migrator.new(:up, selected_migrations, schema_migration, target_version).migrate
543 543
      end
544 544

  
545 545
      def down(target_version = nil)
......
549 549
          else
550 550
            migrations
551 551
          end
552
        Migrator.new(:down, selected_migrations, target_version).migrate
552
        Migrator.new(:down, selected_migrations, schema_migration, target_version).migrate
553 553
      end
554 554

  
555 555
      def run(direction, target_version)
556
        Migrator.new(direction, migrations, target_version).run
556
        Migrator.new(direction, migrations, schema_migration, target_version).run
557 557
      end
558 558

  
559 559
      def open
560
        Migrator.new(:up, migrations, nil)
560
        Migrator.new(:up, migrations, schema_migration)
561 561
      end
562 562
    end
563 563

  
......
571 571
          self.current_plugin = plugin
572 572
          return if current_version(plugin) == version
573 573

  
574
          MigrationContext.new(plugin.migration_directory).migrate(version)
574
          MigrationContext.new(plugin.migration_directory, ::ActiveRecord::Base.connection.schema_migration).migrate(version)
575 575
        end
576 576

  
577 577
        def get_all_versions(plugin = current_plugin)
578
-