Skip to content
New issue

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

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

Already on GitHub? # to your account

Config option to exclude models #169

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

slawosz
Copy link
Collaborator

@slawosz slawosz commented Nov 6, 2024

This pull request introduces a config option to disable one or more models entirely:

proc { |x| x.to_s =~ /Namespace::/ } will exclude all

In my application, there were 2 models with very similar names: Namespace::Foo and Foo, pointing to table foos in 2 different databases. Because dfe-analytics does not recognize namespaces or different databases, the above option is a viable solution to the problem. The reason for similar models/tables is migration - one application data is moving to another.

@slawosz slawosz force-pushed the allow-to-exclude-models branch from 806d77b to f1aa702 Compare November 6, 2024 13:24
Copy link
Collaborator

@asatwal asatwal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM. Looks like a useful change also. Some rspec failures though.

Copy link
Collaborator

@asatwal asatwal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@asatwal asatwal merged commit a89f3bd into DFE-Digital:main Nov 7, 2024
5 checks passed
asatwal pushed a commit that referenced this pull request Nov 25, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants