oficina / equipo Public

Clone
git clone https://amadan.net/oficina/equipo

Plain git — no account needed to clone.

Download

Download this file

1-- Dynamic specialists slice 1 (protocol 38): Design as a data specialist.
2-- Team records, the same for every member. Nothing an existing row holds
3-- changes meaning: a specialist from before is the team's (project_id ""),
4-- a task has no maker and no Design runs, a step is bound to no data
5-- specialist, and a task file is a Research one.
6ALTER TABLE chat_specialists ADD COLUMN project_id text NOT NULL DEFAULT "";
7-- One open proposal and one active row per profile and scope (the team,
8-- or one project); declined and revoked rows are history.
9CREATE UNIQUE INDEX chat_specialist_open ON chat_specialists(profile, project_id) WHERE state = 'proposed';
10CREATE UNIQUE INDEX chat_specialist_active ON chat_specialists(profile, project_id) WHERE state = 'active';
11-- The data specialist that makes the task's changes ("" is Engineering),
12-- and the Design attempts since the person last acted on the task.
13ALTER TABLE chat_tasks ADD COLUMN maker_specialist_id text NOT NULL DEFAULT "";
14ALTER TABLE chat_tasks ADD COLUMN design_runs integer NOT NULL DEFAULT 0;
15-- The binding a step was dispatched under: the specialist, its revision,
16-- its scope and its granted capabilities (JSON); "" is none.
17ALTER TABLE chat_steps ADD COLUMN specialist_id text NOT NULL DEFAULT "";
18ALTER TABLE chat_steps ADD COLUMN specialist_revision integer NOT NULL DEFAULT 0;
19ALTER TABLE chat_steps ADD COLUMN specialist_project text NOT NULL DEFAULT "";
20ALTER TABLE chat_steps ADD COLUMN specialist_caps text NOT NULL DEFAULT "";
21CREATE INDEX chat_step_specialist ON chat_steps(specialist_id);
22-- A task file is a Research image or a Design render (of one option, at
23-- one tree digest).
24ALTER TABLE chat_task_files ADD COLUMN source text NOT NULL DEFAULT "research";
25ALTER TABLE chat_task_files ADD COLUMN option text NOT NULL DEFAULT "";
26ALTER TABLE chat_task_files ADD COLUMN tree_digest text NOT NULL DEFAULT "";
27