-
Notifications
You must be signed in to change notification settings - Fork 690
Fix SERIAL columns to respect explicitly provided values including NULL #2204
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
Co-authored-by: mathiasrw <[email protected]>
… overwriting Co-authored-by: mathiasrw <[email protected]>
mathiasrw
left a comment
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.
…functions, and multi-line SQL Co-authored-by: mathiasrw <[email protected]>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
mathiasrw
left a comment
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.
Co-authored-by: mathiasrw <[email protected]>
Description
SERIAL columns always overwrote user-provided values with the auto-increment counter, preventing ID preservation when re-inserting data from external storage. This fix now properly handles explicit values, NULL values, and ensures type-safe numeric comparisons.
Changes
Modified
src/60createtable.jsinsert logic:undefinedornull+operator to ensure safe numeric comparisonvalue >= current_counterto prevent future collisionsAdded
test/test895.jswith comprehensive test coverage:users,products,orders,customers,items,records) and descriptive variable names (testId)Related Issue
Fixes #895
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.