Closed epidevops closed 1 year ago
Hi @epidevops,
Thank you for using the gem! And I'm sorry it took me long to answer.
As I understand your problem, you have multiple databases. Some of the ActiveRecord models are mapped to the tables in those databases.
For some reason (I didn't quite get why), you can't connect to those databases when you run database_consistency
.
So you would like to exclude those models/databases from being checked.
Your feature, which proposes exclusion by database, sounds excellent to me. For now, please try to define a list of models that have tables in those databases. It may help you as a temporary workaround. Please, let me know if it worked out.
Hi @epidevops,
Just merged: https://github.com/djezzzl/database_consistency/pull/204.
I'm sorry it took me long to implement this.
It was released on 1.7.12.
You can turn it off by following this documentation: https://github.com/djezzzl/database_consistency/wiki/disable-per-database-connection
I hope it helps! Have a great time!
Hello, I have implemented your gem and it has proved quite useful. Is the feature request below valid or is there a configuration that can allow me to disable specific database connections?
Issue
In environment with multiple database connections including one to a sqlserver database database_consistency cannot run because non primary databases cannot be excluded.
Feature
Ability to configure gem to exclude specified database connections.
Connection database.yml setup
Config .database_consistency.yml setup
Error log generated when running either of the commands below: