Skip to content

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

18 linesCodeBlameRaw
1-- What security keeps by a work item's number also keeps the item's id and
2-- workspace, from `work.migrated` (g1t #57): a repository transferred to
3-- another workspace still finds the item it had, never the new
4-- workspace's item of the same number.
5ALTER TABLE updates ADD COLUMN item_id TEXT;
6ALTER TABLE updates ADD COLUMN item_workspace TEXT;
7ALTER TABLE update_pulls ADD COLUMN item_id TEXT;
8ALTER TABLE update_pulls ADD COLUMN item_workspace TEXT;
9ALTER TABLE upgrades ADD COLUMN item_id TEXT;
10ALTER TABLE upgrades ADD COLUMN item_workspace TEXT;
11ALTER TABLE code_alerts ADD COLUMN item_id TEXT;
12ALTER TABLE code_alerts ADD COLUMN item_workspace TEXT;
13ALTER TABLE alert_fixes ADD COLUMN item_id TEXT;
14ALTER TABLE alert_fixes ADD COLUMN item_workspace TEXT;
15-- Pages already applied rewrote the numbers without the ids: the cron's
16-- catch-up reads the whole map again, and each page fills in the ids of
17-- rows already on their new numbers (store.rs `WORK_MIGRATED`).
18UPDATE work_catch_up SET cursor = NULL, page = 0, done_at = NULL WHERE name = 'work.migrated';