-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
Unexpected behavior changes for View-based models in v1.7.25 #236
Comments
Hi! Thank you for letting us know! We have changed the way we select models https://github.com/djezzzl/database_consistency/pull/232/files#diff-75ea970610cc52093dc977330caee9fe665e2a18c27de911808990d5d4ae4906R42 Could you please check the validity of the issues raised? If they are not valid, we probably should stop checking views and/or materialized views. |
I tried my best, but the following seem not possible to implement for a view (at least for PostgreSQL):
I would not be surprised if those also cannot be implemented for other SQL dialects. Of the checks I listed above, Interestingly, |
Thank you! So, we should disable some of the checks for views. Would you like to contribute? |
When upgrading from v1.7.24 to v1.7.25, my team experienced a bunch of new violations flagged, specifically for our ActiveRecord models that are based on DB Views. This happened both for materialized and not-materialized Views.
Examples of newly flagged violations:
To be clear, I don't think these violations are necessarily incorrect to flag, but given the upgrade was only a patch version, we were surprised to see a bunch of new violations. We can work around this by disabling checks on these models and then fixing the issue incrementally.
As an FYI, we are using the scenic gem to help us manage the DB views, but I don't think that's relevant to the behavior change here.
We are running our Rails application with:
Let me know if there's any other info I can provide to help debug + test!
The text was updated successfully, but these errors were encountered: