Skip to content

Commit 13697d1

Browse files
fidelpjurewicz
andcommitted
Add support for Trilogy MySQL adapter
It will be a default in Rails 7.1. In our scope it's yet another MySQL adapter and check only matters when allowing specific data types supported by database itself. Co-authored-by: Piotr Jurewicz <[email protected]>
1 parent 3d70cc8 commit 13697d1

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

ruby_event_store-active_record/lib/ruby_event_store/active_record/generators/database_adapter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def self.from_string(adapter_name, data_type = NOT_SET)
6363
case adapter_name.to_s.downcase
6464
when "postgresql", "postgis"
6565
PostgreSQL.new(data_type)
66-
when "mysql2"
66+
when "mysql2", "trilogy"
6767
MySQL.new(data_type)
6868
when "sqlite"
6969
SQLite.new(data_type)

ruby_event_store-active_record/spec/database_adapter_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ module ActiveRecord
99
expect(DatabaseAdapter.from_string("PostgreSQL")).to eql(DatabaseAdapter::PostgreSQL.new)
1010
expect(DatabaseAdapter.from_string("PostGIS")).to eql(DatabaseAdapter::PostgreSQL.new)
1111
expect(DatabaseAdapter.from_string("MySQL2")).to eql(DatabaseAdapter::MySQL.new)
12+
expect(DatabaseAdapter.from_string("Trilogy")).to eql(DatabaseAdapter::MySQL.new)
1213
expect(DatabaseAdapter.from_string("SQLite")).to eql(DatabaseAdapter::SQLite.new)
1314
end
1415

0 commit comments

Comments
 (0)