fix(sqlite): preserve column size when decimalDigits is null - #2170
Conversation
Live-database verification (SQLite 3.51)
Before the fix: the |
|
Thanks for adding the verification. I reviewed the current head, and this is not ready to merge yet. The SQLite verification does not exercise the changed branch. Please first identify and test an enum-backed type that reaches the precision-only branch, or adjust the implementation/scope if that branch is not reachable for SQLite. Add automated generated-DDL regression tests for null size, size-only, and size-plus-scale, rebase onto the latest |
openai0229
left a comment
There was a problem hiding this comment.
The SQLite verification still does not execute the modified enum-backed branch, so the PR has not established a reachable bug or regression test. The current head does not address the detailed review comment already posted, so this remains blocked pending an updated commit and re-review.
buildDataType guarded with columnSize == null || decimalDigits == null, returning bare typeType for sized columns without scale (VARCHAR(255)). The size-only branch was unreachable dead code. Guard on columnSize only, making the size-only branch reachable. Mirrors every sibling. Fixes OtterMind#2167 Co-Authored-By: Claude <noreply@anthropic.com>
|
Rebased onto latest main. Added 4 generated-DDL tests in SqliteColumnTypeEnumTest:
Tests run: 4, Failures: 0. |
28ad1e3 to
87bf640
Compare
openai0229
left a comment
There was a problem hiding this comment.
Re-reviewed after updating to current main. The size-only branch is now reachable, the SQLite guard changes are preserved, and the focused regression tests pass.
Related issue
Closes #2167
Summary
SqliteColumnTypeEnum.buildDataType guarded with if (columnSize == null || decimalDigits == null), returning bare columnType for sized columns without scale (VARCHAR(255), INTEGER(10)) — the size was lost. The size-only branch at line 152 was unreachable dead code because line 149 already returned. Changed the guard to columnSize == null only, making the size-only branch reachable. Mirrors every sibling (SqlServer, DM, DB2, Oracle, etc.).
Verification
Contributor declaration
AI assistance: The fix, verification, and PR description were produced with Claude Code assistance.