-
Notifications
You must be signed in to change notification settings - Fork 678
Fix auto reversing with insert data #1963
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
Conversation
This looks great. Assuming the build passes I will merge it. Thanks for your patience! Had a few important unexpected family events recently. |
Apologies while I was sorting out some build pipeline stuff. It looks like your code has an issue |
1b1e047
to
beaa95a
Compare
@jzabroski |
@AdrianoRNascimento Your test stub class for auto-reversing broke an unrelated test that was checking to see if we applied all migrations in the assembly - I fixed it and added it to your branch. Re-running the build now and all should pass, then we will merge it. Thanks for your wonderful contribution. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Address test failure: Foreign keys are not supported in SQLite
@jzabroski |
When a table has an FK to itself, the current approach of auto-reverting the inserts fails because it tries to delete rows in the same order they were inserted.
As an example, SQL Server generates this error:
To solve this error, deleting the rows in the inverted order they were inserted is appropriate, exactly as it happens with the expressions.