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

ERROR: constraint 25733 is not a foreign key constraint #27

Open
David-Angel opened this issue Mar 28, 2018 · 2 comments
Open

ERROR: constraint 25733 is not a foreign key constraint #27

David-Angel opened this issue Mar 28, 2018 · 2 comments

Comments

@David-Angel
Copy link

After running the generated upgrade script we get this error when trying to delete records from a parent table. (cascading deletes to its children)

The problem is the change script is generating these bad triggers.
CREATE CONSTRAINT TRIGGER "RI_ConstraintTrigger_c_16652"

That looks to be a method of creating foreign key cascading which no longer works.

Add this to "trigger.go" in func initTriggerSqlTemplate()
and t.tgname not like 'RI_ConstraintTrigger%'

To support older versions of postgresql it could be a parameter passed in to exclude them.

@joncrlsn
Copy link
Owner

joncrlsn commented Apr 2, 2018

Thank you, David! I put that into a development branch that will hopefully get to the product soon.

@cazgp
Copy link

cazgp commented Jun 14, 2018

Having the same issue with the TRIGGER check. Any ideas on when this may land? Is feature/handle-case usable? Unfortunately my go-fu is not great, but if you need any testers or anything, happy to help! And thanks for the great library.

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

3 participants