CodeIssuesDiscussionsWikiPull RequestsProjectsCommitsActionsReleasesContributorsPulse● GatesSecuritySettingsDeploymentsPipelineInsightsAgents✨ Explain✨ Ask AI✨ Workspace✨ Spec✨ Tests▓ Debt Map✨ NL Search🏛 Archaeology
Blame · Line-by-line history
0091_codeowners_review_requests.sql
Each line is annotated with the commit that last touched it. Click any SHA to jump to that commit and see the surrounding change.
| ec9e3e3 | 1 | -- Migration 0077: CODEOWNERS auto-assign + required reviews before merge |
| 2 | -- Adds pr_review_requests table for tracking requested reviewers per PR. | |
| 3 | -- (branch_protection table already exists from an earlier migration.) | |
| 4 | ||
| 5 | CREATE TABLE IF NOT EXISTS pr_review_requests ( | |
| 6 | id uuid PRIMARY KEY DEFAULT gen_random_uuid(), | |
| 7 | pr_id uuid NOT NULL REFERENCES pull_requests(id) ON DELETE CASCADE, | |
| 8 | reviewer_id uuid NOT NULL REFERENCES users(id) ON DELETE CASCADE, | |
| 9 | requested_by uuid REFERENCES users(id), | |
| 10 | created_at timestamp DEFAULT now(), | |
| 11 | UNIQUE(pr_id, reviewer_id) | |
| 12 | ); | |
| 13 | ||
| 14 | CREATE INDEX IF NOT EXISTS pr_review_requests_pr ON pr_review_requests(pr_id); | |
| 15 | CREATE INDEX IF NOT EXISTS pr_review_requests_reviewer ON pr_review_requests(reviewer_id); |