0001_front_page.sql
This file
Path
apps/platform/migrations/0001_front_page.sql
24 lines · 685 bytes · SQL
Last changed by
Not known.
History of this fileTake it
1-- The front page: every open ask of every project, projected from each2-- project's outbox by packages/project/src/projection-d1 (its tables.ts3-- holds this text). The projection is the only writer.45CREATE TABLE front_page (6 project TEXT NOT NULL,7 ask TEXT NOT NULL,8 kind TEXT NOT NULL,9 reserve TEXT,10 want TEXT NOT NULL,11 territory TEXT NOT NULL,12 -- how many live claims hold the ask13 claimed INTEGER NOT NULL,14 -- the asks it waits on, as a JSON array of ask ids15 blocked_by TEXT NOT NULL,16 opened_at TEXT NOT NULL,17 PRIMARY KEY (project, ask)18);1920-- The last event applied per project.21CREATE TABLE cursor (22 project TEXT PRIMARY KEY,23 seq INTEGER NOT NULL24);