Review comment on
DM-14811: "This may be out of scope for this issue, but since we know which tables any of our views will depend on, could we make the creation of just those tables trigger view creation?". The answer is yes, but it is tricky because:
- Schema.addTable doesn't know about the relations.
- SQLAlchemy DDLEvents trigger on single entities only.
For the latter a solution would be to trigger view creation / dropping on all relations. This may duplicate some calls, but (in case of drop in particular) is probably the right thing to do.
This still needs a solution to the first point, developing that is part of this ticket.