summaryrefslogtreecommitdiff
path: root/internal/store/sqlite_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/store/sqlite_test.go')
-rw-r--r--internal/store/sqlite_test.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/internal/store/sqlite_test.go b/internal/store/sqlite_test.go
index c64e6b3..95996b3 100644
--- a/internal/store/sqlite_test.go
+++ b/internal/store/sqlite_test.go
@@ -193,6 +193,15 @@ func setupTestStoreWithNativeTasks(t *testing.T) *Store {
bucket_state TEXT DEFAULT '',
bucket_last_active_at DATETIME
);
+ -- The task queries join against this to check the owning chain's status
+ -- (see visibleChainTaskClause), so it has to exist even for tests that
+ -- only ever create plain, chain-less tasks.
+ CREATE TABLE IF NOT EXISTS task_chains (
+ id TEXT PRIMARY KEY,
+ project_id TEXT DEFAULT '',
+ status TEXT DEFAULT 'active',
+ created_at DATETIME DEFAULT CURRENT_TIMESTAMP
+ );
`
if _, err := db.Exec(schema); err != nil {
t.Fatalf("Failed to create schema: %v", err)