-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add component to comment with the database role
With multiple databases in Rails 6, it can be difficult to tell from logging if your database query is being made against the leader or follower database. This change adds a new component, `db_role`, which can be used with the database host and name to annotate the query with the current ActiveRecord role.
- Loading branch information
1 parent
9438571
commit b433096
Showing
4 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,4 @@ gemfile: | |
- gemfiles/5.0.gemfile | ||
- gemfiles/5.1.gemfile | ||
- gemfiles/5.2.gemfile | ||
- gemfiles/6.0.gemfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
source "https://rubygems.org" | ||
|
||
gem "mysql2", "~> 0.4.10" | ||
gem "pg", "~> 0.15" | ||
gem "sqlite3", "~> 1.3.6" | ||
gem "rails", "= 6.0.3" | ||
|
||
gemspec :path => "../" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters