Skip to content
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

Add triggers to prevent cross-parentage #360

Closed
jace opened this issue Feb 16, 2019 · 1 comment
Closed

Add triggers to prevent cross-parentage #360

jace opened this issue Feb 16, 2019 · 1 comment
Milestone

Comments

@jace
Copy link
Member

jace commented Feb 16, 2019

Some models share Project as a parent but also have foreign key relationships to each other. The Schedule model, for instance, links to Project, Proposal and VenueRoom and the latter two also link to Project. It is possible for the Project to be different between these various rows, which is (a) a violation of third normal form, but accepted here as a necessary trade-off, but (b) also a violation of the application data model.

Funnel should have post-insert and post-update triggers on such models to check for shared parentage of affiliated models. Code for this can be adapted from Coaster's add_primary_relationship trigger.

@jace jace added this to the Data sanity milestone Mar 25, 2019
jace pushed a commit that referenced this issue Apr 6, 2020
@jace
Copy link
Member Author

jace commented Apr 27, 2021

We're moving away from cross-parentage design in all current work. Venue and VenueRoom remain as legacy models that should be addressed when offline events pick up again, post-pandemic. Closing this ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant