mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
fix(state): preserve rollback across additive columns (#121075)
* fix(state): tolerate compatible additive columns Preserve same-version rollback compatibility for bare nullable SQLite columns while continuing to reject constrained schema drift. Treat the historical shared_host CHECK definition as a named compatibility boundary.\n\nRefs #121061 * fix(state): keep additive registry internal * test(state): keep constrained preflight fixture
This commit is contained in:
committed by
GitHub
parent
46e6f93a86
commit
a3e79236aa
@@ -27,6 +27,8 @@ Each database records its schema in two places:
|
||||
|
||||
OpenClaw applies forward-only migrations when it opens an older supported database. It refuses a database whose `user_version` is newer than the running build and reports a `newer schema version` error. The Gateway checks all registered databases before startup. `openclaw update` also refuses a package or source target whose declared schema support is older than an on-disk database. Target packages published before schema metadata was added cannot be preflighted.
|
||||
|
||||
Changes may stay at the same schema version only when downgraded readers remain safe. New tables qualify because older builds ignore them. An explicitly compatible column on an existing table qualifies only when its declaration is exactly one bare nullable SQLite `STRICT` datatype: `ANY`, `BLOB`, `INT`, `INTEGER`, `REAL`, or `TEXT`. The declaration cannot have a default, `NOT NULL`, a primary or unique key, a check, a reference, a collation, a generated expression, or another suffix. Constrained existing-table additions require a schema-version bump or a companion table instead.
|
||||
|
||||
Installing OpenClaw manually through npm bypasses the updater guard. Database open checks still refuse an incompatible build.
|
||||
|
||||
## Agent schema history
|
||||
|
||||
Reference in New Issue
Block a user