Project

General

Profile

Actions

Patch #42675

open

Add trilogy support

Added by Pavel Rosický 4 days ago. Updated 1 day ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Database
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Support for the Trilogy adapter was added in Rails 7.1.

https://github.com/rails/rails/pull/47880
https://github.com/trilogy-libraries/trilogy

database.yml

production:
  adapter: trilogy

diff --git a/Gemfile b/Gemfile
index 1103c6d69..771c2c3d1 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


Files

Actions #1

Updated by Go MAEDA 3 days ago

  • Target version set to Candidate for next major release
Actions #2

Updated by Go MAEDA 2 days ago

Thank you for the patch to add support for the Trilogy adapter.

I've also attached an additional patch to update config/database.yml.example so that Redmine users can see that trilogy is available as an alternative to mysql2.

Actions #3

Updated by Go MAEDA 1 day ago

  • Category set to Database
  • Target version changed from Candidate for next major release to 6.1.0

Setting the target version to 6.1.0.

Actions

Also available in: Atom PDF