db: auto-add missing model columns on startup (fix backupschedule.agent_id) (0.38.3)

create_all never ALTERs an existing table, so installs predating the
backupschedule.agent_id column kept the old schema and any ORM query
naming it failed with "no such column" — which the new fleet dashboard
(and the schedules list / scheduler loop) hit. init_db now diffs each
mapped table against the live schema and ADD COLUMNs the missing
nullable/defaulted ones. Idempotent and self-healing for similar drift.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
menzelj
2026-06-24 11:43:17 +00:00
co-authored by Claude Opus 4.8
parent d399caadc9
commit e651029ab2
3 changed files with 41 additions and 2 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "stackpilot-frontend",
"private": true,
"version": "0.38.2",
"version": "0.38.3",
"type": "module",
"scripts": {
"dev": "vite",