Commit 7f5232f
committed
feat(ddl): record schema version metadata on ADD/DROP COLUMN
ALTER TABLE ... ADD COLUMN now stamps the new column's `added_at_version`
with the bumped schema version before appending it to the live column
list, so the read path can distinguish columns that did not exist when
older tuples were written.
ALTER TABLE ... DROP COLUMN now records a `DroppedColumn` tombstone
(definition, original position, version at drop) instead of silently
discarding the column definition. This allows the reader to reconstruct
the physical layout of any tuple written before the drop without
requiring row migration.
The CONVERT path initialises `dropped_columns` to an empty vec to keep
all `StrictSchema` construction sites consistent.1 parent 0d85eef commit 7f5232f
3 files changed
Lines changed: 15 additions & 3 deletions
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
65 | 68 | | |
66 | | - | |
| 69 | + | |
67 | 70 | | |
68 | 71 | | |
69 | 72 | | |
| |||
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
83 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
84 | 92 | | |
85 | 93 | | |
86 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
| |||
0 commit comments