0001 Init

Path: loom-sprint-scaffold/loom/migrations/0001_init.sqlRelative: loom/migrations/0001_init.sqlSubproject: loom-sprint-scaffoldCategory: other
Lines: 101Bytes: 4,113Imports: 0Exports: 0

Content Preview

  1. -- LOOM 0001_init — 7 core tables + FTS5 + append-only enforcement.
  2. -- Identical on local workerd (--local) and edge D1 (--remote): D1 = SQLite.
  3. CREATE TABLE goals (
  4. goal_id TEXT PRIMARY KEY,
  5. original_spec TEXT NOT NULL,
  6. spec_hash TEXT NOT NULL,
  7. status TEXT NOT NULL CHECK (status IN ('active','reformulating','halted','completed','failed')),
  8. tunables_json TEXT NOT NULL,
  9. created_at TEXT NOT NULL
  10. );
  11. CREATE TABLE stages (
  12. stage_id TEXT PRIMARY KEY,
  13. goal_i