Commit d337f42
committed
docs(driver-sql): the lookup arm no longer claims a platform id is 26 characters
`createColumn`'s `case 'lookup': case 'user':` arm argued that `maxLength`
must not bind a reference column, and backed it with a worked example: a
26-character ULID refused by `varchar(20)` as `ERROR 1406 Data too long`.
That number is not this platform's, and at the real one the example did not
hold — 16 characters fit in `varchar(20)`.
Measured, not inferred:
- `DEFAULT_ID_LENGTH` is 16, and `git log -p --follow` over the whole life
of the file yields exactly one `+const DEFAULT_ID_LENGTH` line and no `-`
line: it has never been anything else. The id shape never moved, so
neither site was residue.
- No ULID is minted anywhere in the repo. `git grep -rni ulid` excluding
the lockfile returns 0, with `nanoid` as the firing control (50).
- Driving the real `SqlDriver` against SQLite: a write supplying no id gets
a 16-character nanoid; a write supplying one has it stored verbatim at
whatever width the caller chose (10-, 17- and 18-character ids all landed
unaltered). Nothing on this path bounds an id's width at all.
The argument the sentence supports is unchanged and is now stated in the
stronger form the measurement licenses: an id's width is not a fixed number,
so no `maxLength` can be known to fit one. Nothing about what the driver
mints changes; the diff is comments only.
The sibling comment in `sql-driver-string-maxlength-varchar.test.ts` carried
the same number and moves with it. Four `packages/cli` sites cite this arm by
name for it and are filed as #16114 rather than fixed here.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ARYe3yQTQCUFm5qPYNgKaJ1 parent 64011dd commit d337f42
2 files changed
Lines changed: 29 additions & 8 deletions
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
143 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
144 | 147 | | |
145 | 148 | | |
146 | 149 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16008 | 16008 | | |
16009 | 16009 | | |
16010 | 16010 | | |
16011 | | - | |
16012 | | - | |
16013 | | - | |
16014 | | - | |
16015 | | - | |
16016 | | - | |
| 16011 | + | |
| 16012 | + | |
| 16013 | + | |
| 16014 | + | |
| 16015 | + | |
| 16016 | + | |
| 16017 | + | |
| 16018 | + | |
| 16019 | + | |
| 16020 | + | |
| 16021 | + | |
| 16022 | + | |
| 16023 | + | |
| 16024 | + | |
| 16025 | + | |
| 16026 | + | |
| 16027 | + | |
| 16028 | + | |
| 16029 | + | |
| 16030 | + | |
| 16031 | + | |
| 16032 | + | |
| 16033 | + | |
| 16034 | + | |
16017 | 16035 | | |
16018 | 16036 | | |
16019 | 16037 | | |
| |||
0 commit comments