-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
DELETE CASCADE on Foreign Keys #4555
Comments
I made a new PR! #4584 |
@mayleaf Are you sure that all databases support the |
As far as I had found, there was ON DELETE option. But I confused ASE and IQ. As you said, It seems doesn't support ON DELETE on sybase. Then how about add delete trigger for those DBMSs that doesn't support delete cascade? @hannosgit @fmbenhassine |
@mayleaf One option would be to create a new separate method in |
@hannosgit There is already a JobRepository.deleteJobInstance() method. I thought the positive effect of this PR was that it simplifies the SimpleJobRepository implementation, not changes the JobRepository interface. There is no need to create a duplicated signature. If I misunderstood your opinion, please let me know 🙇 |
Yeah that was the idea but if we cannot come up with a solution for these DBs, we have to live with some kind of workaround such as the one I suggested. I have no experience/access with e.g. Sybase, so I cannot help with this. I found this workaround of using triggers to simulate |
|
Hi @fmbenhassine @hannosgit. I've submitted an update for it. Thanks! |
Current Behaviour
The current implementation to delete job instances or job executions issues a separate SQL statement for each metadata table. (see #4497)
Suggested Change
If we define the
DELETE CASCADE
option on each Foreign Key in the metadata table, we could remove all metadata by simply deleting the desired table row and the database will take care of the rest.As far as I can see each supported database supports the
DELETE CASCADE
optionThe text was updated successfully, but these errors were encountered: