summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2024-08-20 05:54:30 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2024-08-20 05:54:30 +0000
commitfb37d2e4fab887d0abed786541d09eaec0838317 (patch)
tree54955154818e214ff006e56c2762dae30fcfac24 /lib
parent578360fdabcccea3510b6aadb6ed3a0a87d4e2d0 (diff)
downloadredmine-fb37d2e4fab887d0abed786541d09eaec0838317.tar.gz
redmine-fb37d2e4fab887d0abed786541d09eaec0838317.zip
Upgrade to Rails 7.2.0 (#36320).
Patch by Takashi Kato (user:tohosaku). git-svn-id: https://svn.redmine.org/redmine/trunk@22960 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/redmine/plugin.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/redmine/plugin.rb b/lib/redmine/plugin.rb
index 7ea6bfada..f341d30e1 100644
--- a/lib/redmine/plugin.rb
+++ b/lib/redmine/plugin.rb
@@ -526,14 +526,14 @@ module Redmine
self.current_plugin = plugin
return if current_version(plugin) == version
- MigrationContext.new(plugin.migration_directory, ::ActiveRecord::Base.connection.schema_migration).migrate(version)
+ MigrationContext.new(plugin.migration_directory, ::ActiveRecord::Base.connection.pool.schema_migration).migrate(version)
end
def get_all_versions(plugin = current_plugin)
# Delete migrations that don't match .. to_i will work because the number comes first
@all_versions ||= {}
@all_versions[plugin.id.to_s] ||= begin
- sm_table = ::ActiveRecord::Base.connection.schema_migration.table_name
+ sm_table = ::ActiveRecord::Base.connection.pool.schema_migration.table_name
migration_versions = ActiveRecord::Base.connection.select_values("SELECT version FROM #{sm_table}")
versions_by_plugins = migration_versions.group_by {|version| version.match(/-(.*)$/).try(:[], 1)}
@all_versions = versions_by_plugins.transform_values! {|versions| versions.map!(&:to_i).sort!}