Schema
Path:
_archive/loom-stale-pre-sprint-snapshot/src/db/schema.tsRelative: loom-stale-pre-sprint-snapshot/src/db/schema.tsSubproject: _archiveCategory: archivedLines: 108Bytes: 3,990Imports: 1Exports: 7
Content Preview
- import { sqliteTable, text, integer, index } from "drizzle-orm/sqlite-core";
- /**
- * 7-table D1 schema — mirrors LOOM-SPEC-001 §D1 1:1.
- * SQLite semantics identical local (wrangler dev --persist-to) and edge (D1).
- * JSON columns hold contract-validated payloads; the contract layer (ajv)
- * is the gate, the DB stores what passed it.
- */
- export const goals = sqliteTable("goals", {
- goalId: text("goal_id").primaryKey(),
- originalSpec: text("original_spec").notNull(),
- specHash: text("spec_has