Skip to main content

max / goingson

1.1 KB · 21 lines History Blame Raw
1 -- SyncKit Groups (p4 / M3): the group_id provenance column on the shareable
2 -- project subtree. A non-null group_id routes a row to that group's shared
3 -- changelog; NULL = personal. This is the static column DDL; the sync triggers
4 -- that read group_id are generated from the SyncSchema manifest at app init
5 -- (syncstore::run_cutover / run_group_migration), not here.
6 --
7 -- These columns must exist before the engine's group-scoped triggers are
8 -- generated, and before the project repo selects group_id, so they live in a
9 -- normal migration (part of the canonical schema) rather than only in the
10 -- runtime step, which also kept the db-sqlite tests in sync.
11
12 ALTER TABLE projects ADD COLUMN group_id TEXT;
13 ALTER TABLE tasks ADD COLUMN group_id TEXT;
14 ALTER TABLE milestones ADD COLUMN group_id TEXT;
15 ALTER TABLE events ADD COLUMN group_id TEXT;
16 ALTER TABLE subtasks ADD COLUMN group_id TEXT;
17 ALTER TABLE annotations ADD COLUMN group_id TEXT;
18 ALTER TABLE task_status_tokens ADD COLUMN group_id TEXT;
19 ALTER TABLE time_sessions ADD COLUMN group_id TEXT;
20 ALTER TABLE attachments ADD COLUMN group_id TEXT;
21