also looking at this
fix(app): an installed database gains the columns a new build needs
#43
4 files
+440
-37
| @@ -168,6 +168,10 @@ export async function startDesktopAgent(options: { version: string }): Promise<D | ||
| 168 | 168 | |
| 169 | 169 | const sender = new AppleScriptSender() |
| 170 | 170 | 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}`) | |
| 171 | 175 | const startedAt = Date.now() |
| 172 | 176 | let messages: MessagesDb | null = null |
| 173 | 177 | let messagesError: string | null = null |
| @@ -496,6 +500,11 @@ export async function startDesktopAgent(options: { version: string }): Promise<D | ||
| 496 | 500 | }, |
| 497 | 501 | engines: allEngines(config).map(engine => ({ id: engine.id, label: engine.label })), |
| 498 | 502 | 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, | |
| 499 | 508 | signIn: signIn.state, |
| 500 | 509 | } |
| 501 | 510 | } |