Commit 09f9361
fix(driver-sql): report a multi-value field left on a stale varchar/text column (#11720)
* fix(driver-sql): report a multi-value field left on a stale varchar/text column
A field that gains `multiple: true` materialises as a `json` column on a fresh
database, but `initObjects` is additive-only: on an existing database nothing is
missing, so the old varchar/text column is kept and every array written to it is
stored as the stringified literal and read back as a string. Measured on live
Postgres 16.13 and MySQL 8.0.46 on the pre-fix tree, `detectManagedDrift()`
returned `[]` for exactly that shape.
Detection only. The column is not migrated: an `ALTER TABLE ... TYPE json USING`
over existing rows plus an index rebuild is a destructive migration over shipped
data, and whether the platform should perform it is a separate open decision.
The new `manual_column_type_change` op has no reconciler arm by design.
Severity `error`, category `needs_confirm` — measured, not chosen for tone: the
artifact-pinned boot gate refuses a boot for `category === 'destructive'` and
nothing else, and every database this describes is already serving.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VK8rFDtg8eREaxBGX99Csn
* test(driver-sql): type the drift suite's find() queries instead of casting
`{ filters: [] } as any` was not merely untyped — `filters` is not a
DriverQuery key at all (`where` is), so the cast was hiding a wrong shape while
adding two sites to the query-options-erasure test-surface ratchet. An empty
query is the typed spelling of "all rows".
Part of #11535
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VK8rFDtg8eREaxBGX99Csn
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 945ffbe commit 09f9361
3 files changed
Lines changed: 582 additions & 0 deletions
File tree
- .changeset
- packages/drivers/driver-sql/src
Lines changed: 63 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
0 commit comments