OXYGENHUB
◆ v0.9.24 oxygenhub / crates / hub / migrations-pg / 0106_project_repos.sql
478 B · SQL · last changed New repository page with board and starting files; assetlinks.json; hung tests stopped; changelog on the WASM tier (closes #360, closes #365, closes #370) 1 day ago source blame history raw
1
-- A repository's boards (oxygenhub#360): a board made or chosen with a new
2
-- repository takes its issues and proposals as they open, each a card at
3
-- the bottom of the board's first column.
4
CREATE TABLE project_repos (
5
    project_id BIGINT NOT NULL REFERENCES projects(id) ON DELETE CASCADE,
6
    repo_id    BIGINT NOT NULL REFERENCES repositories(id) ON DELETE CASCADE,
7
    PRIMARY KEY (project_id, repo_id)
8
);
9
CREATE INDEX project_repos_by_repo ON project_repos (repo_id);