-
Notifications
You must be signed in to change notification settings - Fork 9
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 foreign keys for data consistency #15
Comments
Hi @akalongman , Thanks for the suggestion. I may be missing something, but the problem with doing something like this would be that it would limit what could be managed. It sounds like you might only manage resources from a single table, but not everyone does this. The idea behind the So, there's a trade-off either way. In the current case, one has the ability to represent (by table) more than one DAG within the same application. If foreign key constraints are introduced, then one would enjoy the benefits one gets with those, but one would then be tied to a single table within your DB. While writing this, I considered the possibility of having both, but it would require a significant overhaul:
So...maybe there's a solution here after all...? And, to be honest, I would like to see/use it, because the DAGs I use can get quite large and complex and there's some additional code to manage certain aspects...so foreign keys would help out and alleviate some of the additional "overhead". I'm curious to hear what your thoughts are on this? Thanks |
What do you mean? These columns (edges) used only for in-table purposes according to DAG specification. For external identificators are columns |
LOL! I guess I should look a little more closely at your code. 😆 Sorry, but I read what you wrote and saw some foreign key stuff in the code so I connected the wrong dots. 😅 Anyway, it sounds pretty reasonable. I'm super busy right now, but I'll try to take a close look at it before too much time passes. 🤓 |
I will send a PR 😄 |
Would be great if we add foreign keys. For example I use custom migration file with schema like this:
The text was updated successfully, but these errors were encountered: