diff --git a/Gemfile b/Gemfile index b087c22..372ae7a 100644 --- a/Gemfile +++ b/Gemfile @@ -5,8 +5,8 @@ ruby '3.2.2' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '~> 6.1.4' -# Use mysql as the database for Active Record -gem 'mysql2', '>= 0.4.4' +# Use trilogy as the database for Active Record +gem "activerecord-trilogy-adapter" # Use Puma as the app server gem 'puma', '~> 5.6.2' # Use SCSS for stylesheets diff --git a/Gemfile.lock b/Gemfile.lock index 97248b7..ae6ba9f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -49,6 +49,9 @@ GEM activerecord (6.1.7.6) activemodel (= 6.1.7.6) activesupport (= 6.1.7.6) + activerecord-trilogy-adapter (3.1.2) + activerecord (>= 6.0.a, < 7.1.a) + trilogy (>= 2.4.0) activestorage (6.1.7.6) actionpack (= 6.1.7.6) activejob (= 6.1.7.6) @@ -208,7 +211,6 @@ GEM minitest (5.20.0) msgpack (1.7.2) multi_xml (0.6.0) - mysql2 (0.5.5) nenv (0.3.0) net-imap (0.3.7) date @@ -378,6 +380,7 @@ GEM thor (1.2.2) tilt (2.3.0) timeout (0.4.0) + trilogy (2.6.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (2.5.0) @@ -412,6 +415,7 @@ PLATFORMS DEPENDENCIES aasm + activerecord-trilogy-adapter amazing_print bcrypt_pbkdf (>= 1.0, < 2.0) bootsnap (>= 1.4.2) @@ -436,7 +440,6 @@ DEPENDENCIES listen (>= 3.0.8, < 3.2) meilisearch-rails mini_magick - mysql2 (>= 0.4.4) psych (< 4) puma (~> 5.6.2) rails (~> 6.1.4) diff --git a/config/database.yml b/config/database.yml index a75493a..58e606c 100644 --- a/config/database.yml +++ b/config/database.yml @@ -10,7 +10,7 @@ # https://dev.mysql.com/doc/refman/5.7/en/password-hashing.html # default: &default - adapter: mysql2 + adapter: trilogy encoding: utf8mb4 pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> username: root