Commit 5fd9e6d
fix(runtime): provision sys_metadata table in per-project kernels
The artifact-kernel-factory was passing 'registerSystemObjects: false' to
MetadataPlugin, claiming the control plane owned metadata storage. But
ADR-0005's overlay flow (saveMetaItem in objectql/protocol.ts) writes
customization overlay rows to sys_metadata on the same engine the
protocol is attached to — for per-project kernels that's the project DB.
Result: any PUT /api/v1/meta/{view,dashboard}/... against a cloud
project deployment errored with 'no such table: sys_metadata', e.g.
when a user clicked 'Create View' in Studio:
{
"error": "Failed to persist customization overlay to sys_metadata:
SQLITE_UNKNOWN: SQLite error: no such table: sys_metadata.
In-memory registry was updated but will be lost on restart.",
"code": "overlay_persistence_failed"
}
Flip to true so ObjectQLPlugin.syncRegisteredSchemas provisions the
sys_metadata + sys_metadata_history tables on first cold-start. Both
are project-scoped (project_id column is set on every write), so
multi-project DBs and shared DBs remain correctly isolated.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent eba5af4 commit 5fd9e6d
1 file changed
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
| |||
128 | 132 | | |
129 | 133 | | |
130 | 134 | | |
131 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
132 | 144 | | |
133 | 145 | | |
134 | 146 | | |
| |||
0 commit comments