-
Notifications
You must be signed in to change notification settings - Fork 135
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
Circular dependency #12
Comments
+1 |
You can filter tables and schemas, but that's about it. You can't filter FKs, though I'm not sure how this would work anyway? Wouldn't it still fail trying to delete those tables because there are some rows WITH foreign keys? |
Thank you for your answer. I am new to Respawn and I might not understand well how it works. But I thought it would watch SQL requests going through and then replay a sort of "rollback" by deleting rows that where added. I don't understand why it would delete "tables". Our unit tests only add some rows, and we just need to delete thoses rows, in a certain order, respectfuly of the FKs (delete the children rows in the children table, then the parent row). Thanks again |
It deletes all tables, in the right order. That replay sounds interesting, On Thursday, September 24, 2015, nfaugout notifications@github.com wrote:
|
OK thanks for clarifying. I understand now why Respawn is not compatible with our tables refering to each others. |
So I'm getting this same error; however, it only happens in our AWS environment, not when I run locally - any chance existing data would cause this error where as a clean DB would not? |
Dunno, are the constraints different? |
I ran |
You can close this issue, I opened one that highlights the actual problem that I was encountering |
Hi there,
I get this error when resetting the checkpoint : "There is a circular dependency between the DB tables and we can't safely build the list of tables to delete."
I have 2 tables that refer to each other but with different columns :
table users
table companies
A user has a FK with a company, and a company has a creator column, which is a FK with a user.
Both FK are nullable, so we can create a user without company, then create a company with the user as creator, then update the user with the company key.
Is it something Respawn does not support ?
I have digged into the SQL request generated by Respawn to get all the FK from the database. And I don't see any filter for nullable FK
Thanks for any help.
The text was updated successfully, but these errors were encountered: