Tahinli/forge
public0 watching
★ 0
| 1 | -- Forks and pull requests. Applied by store/migrate.rs. |
| 2 | -- A pull request is an issues row with kind = 'pull' (shared numbering); this table holds the |
| 3 | -- branch, head and mergeability state. head_repo_id is NULL once the head repo is deleted. |
| 4 | |
| 5 | repos ADD COLUMN fork_of TEXT REFERENCES repos(id); |
| 6 | |
| 7 | ( |
| 8 | issue_id TEXT PRIMARY KEY REFERENCES issues(id) ON DELETE CASCADE, |
| 9 | base_branch TEXT NOT NULL, |
| 10 | head_repo_id TEXT REFERENCES repos(id), -- NULL if the head repo was deleted |
| 11 | head_branch TEXT NOT NULL, |
| 12 | head_oid TEXT NOT NULL, -- last known head commit (also refs/pull/N/head) |
| 13 | base_oid TEXT NOT NULL, -- base branch tip when mergeability was last computed |
| 14 | merge_base TEXT, |
| 15 | mergeable TEXT NOT NULL DEFAULT 'unknown', -- 'unknown' | 'clean' | 'conflict' | 'merged' | 'up_to_date' |
| 16 | conflict_files TEXT NOT NULL DEFAULT '[]', -- JSON array of paths |
| 17 | merged_at TEXT, |
| 18 | merged_by TEXT REFERENCES users(id), |
| 19 | merge_commit TEXT, |
| 20 | allow_maintainer_edits INTEGER NOT NULL DEFAULT 1); |
| 21 | ON pull_requests(head_repo_id, head_branch); |