From 6b06d5b17158a687d95c56ed78c5bf04b52a2a83 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Sat, 10 May 2025 07:28:36 +0000 Subject: [PATCH] Add support for Trilogy adapter (#42675). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Pavel Rosický (user:ahorek). git-svn-id: https://svn.redmine.org/redmine/trunk@23753 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- Gemfile | 3 +++ lib/redmine/database.rb | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index e979abf83..4c8f4358f 100644 --- a/Gemfile +++ b/Gemfile @@ -69,6 +69,9 @@ if File.exist?(database_file) when /mysql2/ gem 'mysql2', '~> 0.5.0' gem "with_advisory_lock" + when /trilogy/ + gem 'trilogy', '~> 2.9.0' + gem "with_advisory_lock" when /postgresql/ gem 'pg', '~> 1.5.3' when /sqlite3/ diff --git a/lib/redmine/database.rb b/lib/redmine/database.rb index b3cbdc661..13c92b8a4 100644 --- a/lib/redmine/database.rb +++ b/lib/redmine/database.rb @@ -58,7 +58,7 @@ module Redmine # Returns true if the database is MySQL def mysql? - /mysql/i.match?(ActiveRecord::Base.connection.adapter_name) + /mysql|trilogy/i.match?(ActiveRecord::Base.connection.adapter_name) end def mysql_version