avram
avram copied to clipboard
SchemaEnforcer doesn't know about views
If you have a view or materialzed view, and then create a model where the table is that view, the SchemaEnforcer throws the error that the table is missing.
This seems like an advanced use case but I like this as a feature.
Yeah this does seem tricky, but would be cool to at least validate the view name.
Also, does the error message tell you you can use skip_schema_enforcer? If not we should definitely add that so people know how to disable it per-model
@jwoertink Can you verify that this is fixed with https://github.com/luckyframework/avram/commit/361a9e84d4b1d3cf35346f6eb361c9388bcaccf0
It might take me some time. My app won't compile with those changes, but I think it's related to something else. I'll try to get it in this week if I can.
@jwoertink I believe this has been fixed. There's even a spec verifying SchemaEnforcer with a view https://github.com/luckyframework/avram/pull/555/files#diff-0bd470554a459e4fceec90dca2d35618538153443dfb87154139529eed832206R24-R27
I'm sure this is probably good now. I just haven't had a chance to try it. I only use Materialzed Views though... do you think this will work on those?
@jwoertink I believe so, but definitely double check