Skip to content

Commit 21a1699

Browse files
committed
fix(state): check the deletion journal phase column directly
#168947 removed the admitted-schema-facts lookup from openclaw-state-db-schema-additive.ts in favor of tableHasColumn, while #168199 landed a new ensureAgentDeletionJournalPhaseSchema that still used getAdmittedSqliteSchemaFacts and parseSqliteTableDefinition, leaving main without those imports (tsgo:core TS2304). Use the same direct column check.
1 parent 80d82ca commit 21a1699

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎src/state/openclaw-state-db-schema-additive.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,7 @@ export function reconstructAgentDeletionJournalSchema(
115115

116116
export function ensureAgentDeletionJournalPhaseSchema(database: DatabaseSync): void {
117117
assertAgentDeletionJournalAvailable(database);
118-
const sql = getAdmittedSqliteSchemaFacts(database)?.tableSql.get("agent_deletion_journal");
119-
if (sql && parseSqliteTableDefinition(sql, "agent_deletion_journal").columns.has("phase")) {
118+
if (tableHasColumn(database, "agent_deletion_journal", "phase")) {
120119
return;
121120
}
122121
ensureColumn(database, "agent_deletion_journal", "phase TEXT");

0 commit comments

Comments
 (0)