From a749a6dd83c26f3b242178821d0eb26a65c29899 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Sun, 30 Oct 2022 06:26:02 +0000 Subject: Database migrations don't run correctly for plugins when specifying the `VERSION` env variable (#31116). Contributed by crypto gopher. git-svn-id: https://svn.redmine.org/redmine/trunk@21933 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/plugin.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') diff --git a/lib/redmine/plugin.rb b/lib/redmine/plugin.rb index fb42a8fa9..78eee1e7f 100644 --- a/lib/redmine/plugin.rb +++ b/lib/redmine/plugin.rb @@ -485,6 +485,10 @@ module Redmine def open Migrator.new(:up, migrations, schema_migration) end + + def current_version + Migrator.current_version + end end class Migrator < ActiveRecord::Migrator -- cgit v1.2.3