CodeIssuesDiscussionsWikiPull RequestsProjectsCommitsActionsReleasesContributorsPulse● GatesSecuritySettingsDeploymentsPipelineInsightsAgents✨ Explain✨ Ask AI✨ Workspace✨ Spec✨ Tests▓ Debt Map✨ NL Search🏛 Archaeology
Blame · Line-by-line history
0018_required_checks.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.
| a79a9ed | 1 | -- Gluecron migration 0018: Block E6 — Required status checks matrix. |
| 2 | -- | |
| 3 | -- The existing `branch_protection.requireGreenGates` flag only says "all | |
| 4 | -- gates must pass". This matrix lets owners require SPECIFIC named checks | |
| 5 | -- (workflow names or gate_run kinds) to pass for a branch pattern. | |
| 6 | -- | |
| 7 | -- Tables: | |
| 8 | -- branch_required_checks — one row per (rule, check_name) pairing | |
| 9 | ||
| 10 | --> statement-breakpoint | |
| 11 | CREATE TABLE IF NOT EXISTS "branch_required_checks" ( | |
| 12 | "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, | |
| 13 | "branch_protection_id" uuid NOT NULL, | |
| 14 | "check_name" text NOT NULL, | |
| 15 | "created_at" timestamp DEFAULT now() NOT NULL, | |
| 16 | CONSTRAINT "branch_required_checks_rule_fk" FOREIGN KEY ("branch_protection_id") REFERENCES "branch_protection"("id") ON DELETE cascade | |
| 17 | ); | |
| 18 | ||
| 19 | --> statement-breakpoint | |
| 20 | CREATE INDEX IF NOT EXISTS "branch_required_checks_rule" ON "branch_required_checks" ("branch_protection_id"); | |
| 21 | --> statement-breakpoint | |
| 22 | CREATE UNIQUE INDEX IF NOT EXISTS "branch_required_checks_unique" ON "branch_required_checks" ("branch_protection_id", "check_name"); |