From 6d8cbacc9be56c976cea6ea368543b1fae593b34 Mon Sep 17 00:00:00 2001 From: mika kuns Date: Mon, 10 Aug 2026 17:00:24 +0200 Subject: [PATCH] fix(data): stop AddTaskDependency's table rebuild from dropping scope_globs AddScopeOverlapFields, AddTaskDependency and AddFailureReason were each generated off the same parent migration, so none of their Designer snapshots knows the others' columns. AddTaskDependency calls AddForeignKey, which on SQLite forces a full `tasks` table rebuild generated from that migration's own frozen snapshot -- silently recreating the table without `scope_globs`. Result: the Worker died at startup with "no such column: t.scope_globs" (Hosting failed to start), so it never bound the SignalR port and the App could not connect. Fresh installs were affected too, not just existing DBs. Add the missing ScopeGlobs property to the stale Designer snapshot so the rebuild preserves the column. Verified by migrating a fresh temp DB and diffing pragma_table_info('tasks') against the model snapshot: 39/39 columns. Note: the test suite cannot catch this class of bug -- every fixture uses Database.EnsureCreated(), which builds the schema from the model and never applies the migration chain. --- .../Migrations/20260810115110_AddTaskDependency.Designer.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ClaudeDo.Data/Migrations/20260810115110_AddTaskDependency.Designer.cs b/src/ClaudeDo.Data/Migrations/20260810115110_AddTaskDependency.Designer.cs index 2c3b2808..6ae7b440 100644 --- a/src/ClaudeDo.Data/Migrations/20260810115110_AddTaskDependency.Designer.cs +++ b/src/ClaudeDo.Data/Migrations/20260810115110_AddTaskDependency.Designer.cs @@ -574,6 +574,10 @@ namespace ClaudeDo.Data.Migrations .HasColumnType("TEXT") .HasColumnName("scheduled_for"); + b.Property("ScopeGlobs") + .HasColumnType("TEXT") + .HasColumnName("scope_globs"); + b.Property("SessionSkills") .HasColumnType("TEXT") .HasColumnName("session_skills");