Commit 2ae652c
fix(model-layer): renameTable typo, dropTable IF EXISTS, model-cache flush (PR A, partial)
First (safe, contained) slice of the KYTE-#325 model-layer fixes:
- DBI::renameTable referenced an undefined $tbl_name_news (typo) → emitted a
malformed RENAME; fixed to $tbl_name_new. Rename was effectively broken.
- DBI::dropTable now uses DROP TABLE IF EXISTS (was a bare DROP that errored on
an already-absent table).
- DataModelController + ModelAttributeController now call Api::clearModelCache()
after a schema change (create/rename/delete model, add/change/drop column), so
the new struct is served immediately instead of the stale file cache (up to 1h TTL).
Remaining PR-A items (next session): enforce kyte_locked on the DDL path,
FK-dependency guard before drop column/table, and decimal (precision/scale)
support on ModelAttribute. Then PR B = the MCP schema tools.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent ac437d9 commit 2ae652c
3 files changed
Lines changed: 19 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
716 | 716 | | |
717 | 717 | | |
718 | 718 | | |
719 | | - | |
| 719 | + | |
720 | 720 | | |
721 | 721 | | |
722 | 722 | | |
| |||
741 | 741 | | |
742 | 742 | | |
743 | 743 | | |
744 | | - | |
| 744 | + | |
745 | 745 | | |
746 | 746 | | |
747 | 747 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
207 | 219 | | |
208 | | - | |
| 220 | + | |
209 | 221 | | |
210 | 222 | | |
211 | 223 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
128 | 132 | | |
129 | 133 | | |
130 | 134 | | |
| |||
0 commit comments