Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to report the database reference #102

Open
fidalgo opened this issue Mar 25, 2020 · 0 comments
Open

Allow to report the database reference #102

fidalgo opened this issue Mar 25, 2020 · 0 comments

Comments

@fidalgo
Copy link

fidalgo commented Mar 25, 2020

From the guides https://guides.rubyonrails.org/active_record_multiple_databases.html on multiple databases, we have the following database.yml file:

production:
  primary:
    database: my_primary_database
    user: root
    adapter: mysql
  primary_replica:
    database: my_primary_database
    user: root_readonly
    adapter: mysql
    replica: true
  animals:
    database: my_animals_database
    user: animals_root
    adapter: mysql
    migrations_paths: db/animals_migrate
  animals_replica:
    database: my_animals_database
    user: animals_readonly
    adapter: mysql
    replica: true

I would like to signal which database the query is running. Given the replicas have the same database name, the database comment on marginalia won't work.
Is it possible to add the animals and animals_replica names to the comments?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant