You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 38fabc4
Browse filesBrowse the repository at this point in the historyBrowse files
| 1 | Initial per-agent store ([#88349](https://github.com/openclaw/openclaw/pull/88349)) |`v2026.5.30-beta.1`, stable through `v2026.7.1`|
61
-
| 2 | Memory index identity ([#104449](https://github.com/openclaw/openclaw/pull/104449)) |`v2026.7.2-beta.1`|
62
-
| 4 | Sessions and transcripts moved into SQLite ([#98236](https://github.com/openclaw/openclaw/pull/98236)) |`v2026.7.2-beta.1`|
63
-
| 5-6 | Terminal freshness and state lifecycle ([#104859](https://github.com/openclaw/openclaw/pull/104859)) |`v2026.7.2-beta.1`|
64
-
| 7 | Per-entry lifecycle status projection ([#106151](https://github.com/openclaw/openclaw/pull/106151)) |`v2026.7.2-beta.1`|
| 1 | Initial per-agent store ([#88349](https://github.com/openclaw/openclaw/pull/88349)) |`v2026.5.30-beta.1`, stable through `v2026.7.1`|
61
+
| 2 | Memory index identity ([#104449](https://github.com/openclaw/openclaw/pull/104449)) |`v2026.7.2-beta.1`|
62
+
| 4 | Sessions and transcripts moved into SQLite ([#98236](https://github.com/openclaw/openclaw/pull/98236)) |`v2026.7.2-beta.1`|
63
+
| 5-6 | Terminal freshness and state lifecycle ([#104859](https://github.com/openclaw/openclaw/pull/104859)) |`v2026.7.2-beta.1`|
64
+
| 7 | Per-entry lifecycle status projection ([#106151](https://github.com/openclaw/openclaw/pull/106151)) |`v2026.7.2-beta.1`|
| 17 | Tenant-free per-agent lease table retired after the last writer and routing arm were removed ([#121113](https://github.com/openclaw/openclaw/pull/121113), [#121615](https://github.com/openclaw/openclaw/pull/121615)) | Unreleased |
69
75
70
76
Version 3 was an unshipped development step folded into version 4.
71
77
@@ -129,31 +135,41 @@ The general procedure is:
129
135
3. Set `PRAGMA user_version` and `schema_meta.schema_version` to the target version.
130
136
4. Run the target release's full database verification before starting the Gateway.
131
137
132
-
### Example: agent schema 11 to 9
138
+
### Example: agent schema 17 to 16
133
139
134
-
Schema 10 added the active transcript projection. Schema 11 added leases, durable delivery, conversation-address state, and heartbeat outcomes.
140
+
Schema 17 removed the tenant-free per-agent lease table. A schema 16 build still requires that canonical table, so a manual downgrade must recreate its exact schema before lowering the version.
135
141
136
142
Run equivalent SQL against each affected per-agent database after inspecting the exact schema that wrote it:
137
143
138
144
```sql
139
145
BEGIN IMMEDIATE;
140
146
141
-
DROPTABLE IF EXISTS heartbeat_outcomes;
142
-
DROPTABLE IF EXISTS conversation_deliveries;
143
-
DROPTABLE IF EXISTS state_leases;
144
-
DROPTABLE IF EXISTS session_transcript_active_events;
145
-
146
-
ALTERTABLE session_transcript_index_state DROP COLUMN active_event_count;
147
-
ALTERTABLE session_transcript_index_state DROP COLUMN active_message_count;
148
-
ALTERTABLE conversations DROP COLUMN delivery_target;
149
-
150
-
PRAGMA user_version =9;
147
+
CREATETABLEstate_leases (
148
+
scope TEXTNOT NULL,
149
+
lease_key TEXTNOT NULL,
150
+
owner TEXTNOT NULL,
151
+
expires_at INTEGER,
152
+
heartbeat_at INTEGER,
153
+
payload_json TEXT,
154
+
created_at INTEGERNOT NULL,
155
+
updated_at INTEGERNOT NULL,
156
+
PRIMARY KEY (scope, lease_key)
157
+
) STRICT;
158
+
159
+
CREATEINDEXidx_agent_state_leases_expiry
160
+
ON state_leases(expires_at, scope, lease_key)
161
+
WHERE expires_at IS NOT NULL;
162
+
163
+
CREATEINDEXidx_agent_state_leases_owner
164
+
ON state_leases(owner, updated_at DESC);
165
+
166
+
PRAGMA user_version =16;
151
167
UPDATE schema_meta
152
-
SET schema_version =9,
168
+
SET schema_version =16,
153
169
updated_at = unixepoch('now') *1000
154
170
WHERE meta_key ='primary';
155
171
156
172
COMMIT;
157
173
```
158
174
159
-
This discards version 10-11 state, including in-flight delivery operations, leases, heartbeat outcomes, and the derived active transcript projection. A botched downgrade means restore from the verified backup.
175
+
The recreated table starts empty because schema 17 has no agent-DB lease tenants to preserve. A botched downgrade means restore from the verified backup.
0 commit comments