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

Fix for CreateTable not always adding missing columns #21

Merged
merged 3 commits into from
Jun 28, 2024

Conversation

garthmz
Copy link

@garthmz garthmz commented Jun 28, 2024

This would happen when a previous INSERT/UPDATE/DELETE statement query modified rows. The existing code was incorrectly attempting to check whether a CREATE IF NOT EXISTS statement did anything.
https://www.sqlite.org/c3ref/changes.html

garthmz added 3 commits May 30, 2024 17:12
This would happen when a previous INSERT/UPDATE/DELETE statement
query modified rows.  The existing code was incorrectly attempting
to check whether a CREATE IF NOT EXISTS statement did anything.
https://www.sqlite.org/c3ref/changes.html
MigrateTable(map);
}
// add columns if necessary
MigrateTable(map);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this safely no-op?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's an empty for loop. In fact, if you read the old comment, this was known to be happening when they didn't want it to.

@garthmz garthmz enabled auto-merge (rebase) June 28, 2024 20:05
Copy link

@dustinmz dustinmz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@garthmz garthmz merged commit 11ecdb7 into main Jun 28, 2024
4 checks passed
@garthmz garthmz deleted the user/garth/migrate branch June 28, 2024 20:24
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.

3 participants