sqlite-database-integration icon indicating copy to clipboard operation
sqlite-database-integration copied to clipboard

Fix creating a table with `AUTOINCREMENT` and `ON UPDATE` followed by `PRIMARY KEY`

Open JanJakes opened this issue 1 year ago • 0 comments

This reverts e59eff8c2856a5c96fc0db5da1402d5a258c8aa8. The fix was wrong. When spotting it, I misunderstood that the first token was already consumed.

Without the fix, the new test fails with:

Cannot combine AUTOINCREMENT and multiple primary keys in SQLite.

This is because we've consumed one extra token (,), and the PRIMARY KEY then gets assigned to the created_at column as well.

JanJakes avatar Aug 20 '24 07:08 JanJakes