ReviewOS

also looking at this

stacks/uplink

fix(app): an installed database gains the columns a new build needs

#43
Merged glennmichael123 wants to merge fix/sqlite-store-migrations into main
4 files +440 -37
app/Uplink/desktop-agent.tsmodified+9-0
Changes to app/Uplink/desktop-agent.ts
@@ -168,6 +168,10 @@ export async function startDesktopAgent(options: { version: string }): Promise<D
168168
169169 const sender = new AppleScriptSender()
170170 const store = new SqliteStore(DATABASE_PATH)
171 // A database this app cannot open no longer takes the app with it, so the
172 // one thing that must not happen is it going unmentioned.
173 if (store.schemaError)
174 console.error(`[uplink] ${store.schemaError}`)
171175 const startedAt = Date.now()
172176 let messages: MessagesDb | null = null
173177 let messagesError: string | null = null
@@ -496,6 +500,11 @@ export async function startDesktopAgent(options: { version: string }): Promise<D
496500 },
497501 engines: allEngines(config).map(engine => ({ id: engine.id, label: engine.label })),
498502 lastError: uplink?.lastError ?? null,
503 // Not a check: a broken database is not a setup step anyone performs,
504 // and it must not hold the app in `setup` when it is still answering
505 // texts. The popover shows this in every state, which a check row cannot
506 // do. See `SqliteStore.schemaError`.
507 notice: store.schemaError,
499508 signIn: signIn.state,
500509 }
501510 }