Skip to content

Commit

Permalink
Update mysql2 references
Browse files Browse the repository at this point in the history
  • Loading branch information
excid3 committed Jan 31, 2024
1 parent 7bfb4bf commit 62b8416
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ Running tests against multiple databases locally:

```
DATABASE_URL=sqlite3:noticed_test rails test
DATABASE_URL=mysql2://root:@127.0.0.1/noticed_test rails test
DATABASE_URL=trilogy://root:@127.0.0.1/noticed_test rails test
DATABASE_URL=postgres://127.0.0.1/noticed_test rails test
```

Expand Down
2 changes: 0 additions & 2 deletions gemfiles/rails_7_1.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ GEM
minitest (5.21.2)
multi_json (1.15.0)
mutex_m (0.2.0)
mysql2 (0.5.5)
net-http (0.4.1)
uri
net-http2 (0.18.5)
Expand Down Expand Up @@ -288,7 +287,6 @@ DEPENDENCIES
appraisal
byebug
googleauth (~> 1.1)
mysql2
net-smtp
noticed!
pg
Expand Down
2 changes: 0 additions & 2 deletions gemfiles/rails_main.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ GEM
mini_mime (1.1.5)
minitest (5.21.2)
multi_json (1.15.0)
mysql2 (0.5.5)
net-http (0.4.1)
uri
net-http2 (0.18.5)
Expand Down Expand Up @@ -288,7 +287,6 @@ DEPENDENCIES
appraisal
byebug
googleauth (~> 1.1)
mysql2
net-smtp
noticed!
pg
Expand Down
2 changes: 1 addition & 1 deletion lib/noticed/has_notifications.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def has_noticed_notifications(param_name: model_name.singular, **options)
case current_adapter
when "postgresql", "postgis"
model.where("params @> ?", Noticed::Coder.dump(param_name.to_sym => self).to_json)
when "mysql2"
when "mysql2", "trilogy"
model.where("JSON_CONTAINS(params, ?)", Noticed::Coder.dump(param_name.to_sym => self).to_json)
when "sqlite3"
model.where("json_extract(params, ?) = ?", "$.#{param_name}", Noticed::Coder.dump(self).to_json)
Expand Down

0 comments on commit 62b8416

Please sign in to comment.