internal/store/migrations/0042_mr_review_requests.up.sql

ac8d910ff31c2fadc452928e1d56c64b4af25495
gitbay/internal/store/migrations/0042_mr_review_requests.up.sql

11 lines · 532 bytes

 1-- Requesting a review is a direct push to a specific person, the merge
 2-- request counterpart of issue_assignees (0001).
 3CREATE TABLE mr_review_requests (
 4    mr_id   INTEGER NOT NULL REFERENCES merge_requests(id) ON DELETE CASCADE,
 5    user_id INTEGER NOT NULL REFERENCES users(id) ON DELETE CASCADE,
 6    PRIMARY KEY (mr_id, user_id)
 7);
 8
 9-- Same problem as issue_assignees (0035): the primary key leads with
10-- mr_id, so the review queue had no way in by user.
11CREATE INDEX mr_review_requests_user ON mr_review_requests(user_id);
Keyboard shortcuts

Global

⌘K
Command palette & jump
/
Focus search
?
Show this help
g d
Dashboard
g e
Explore repositories
g n
Notifications

Repository & editor

t
Find file in repository
y
Copy immutable SHA permalink
g c
Code tab
g i
Issues tab
g m
Merge requests tab
g b
Builds tab
⌘↵
Submit active form