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

Ignore duplicate inferred migrations having the same timestamp #369

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

andrew-farries
Copy link
Collaborator

Remove all but the last inferred migration in a group of inferred migrations that occur at the same timestamp with the same migration SQL.

Such inferred migrations are typically part of a batched transaction for which we want to ignore all but the effect of the last statement in the batch.

@andrew-farries andrew-farries changed the title No dupe inferred migrations with same timestamp Ignore duplicate inferred migrations having the same timestamp Jul 9, 2024
We assume that if there are multiple inferred migrations with the same
timestamp and the same `up` SQL that they are part of a multi-statement
batch. In those cases we are only interested in the last migration in
the batch.
@andrew-farries andrew-farries force-pushed the fix-duplicate-batched-migrations branch from 036a2e0 to 093f92e Compare July 10, 2024 10:47
@andrew-farries andrew-farries merged commit aa0c6a4 into main Jul 10, 2024
44 checks passed
@andrew-farries andrew-farries deleted the fix-duplicate-batched-migrations branch July 10, 2024 10:52
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

Successfully merging this pull request may close these issues.

2 participants