Pre-launch — Gluecron is in final validation. Public signups and git hosting for non-owner users open after launch review.
CodeIssuesDiscussionsWikiPull RequestsProjectsCommitsActionsReleasesContributorsPulse● GatesSecuritySettingsDeploymentsPipelineInsightsAgents✨ Explain✨ Ask AI✨ Workspace✨ Spec✨ Tests▓ Debt Map✨ NL Search🏛 Archaeology
Blame · Line-by-line history

0036_issue_dependencies.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.

0036_issue_dependencies.sqlBlame23 lines · 1 contributor
bed6b57Claude1-- Block J14 — Issue dependencies / blocked-by relationships.
2--
3-- One row = "blocker blocks blocked". The dependency is considered resolved
4-- when the blocker issue is closed. Both issues must belong to the same repo
5-- (enforced at the application layer).
6
7CREATE TABLE IF NOT EXISTS "issue_dependencies" (
8 "id" uuid PRIMARY KEY DEFAULT gen_random_uuid(),
9 "blocker_issue_id" uuid NOT NULL REFERENCES "issues"("id") ON DELETE CASCADE,
10 "blocked_issue_id" uuid NOT NULL REFERENCES "issues"("id") ON DELETE CASCADE,
11 "created_by" uuid REFERENCES "users"("id") ON DELETE SET NULL,
12 "created_at" timestamp NOT NULL DEFAULT now(),
13 CONSTRAINT "issue_dep_no_self" CHECK ("blocker_issue_id" <> "blocked_issue_id")
14);
15
16CREATE UNIQUE INDEX IF NOT EXISTS "issue_deps_blocker_blocked_unique"
17 ON "issue_dependencies" ("blocker_issue_id", "blocked_issue_id");
18
19CREATE INDEX IF NOT EXISTS "issue_deps_blocked_idx"
20 ON "issue_dependencies" ("blocked_issue_id");
21
22CREATE INDEX IF NOT EXISTS "issue_deps_blocker_idx"
23 ON "issue_dependencies" ("blocker_issue_id");