Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

refactor(store): put review_run's primary-key columns first

rebelice3b491b17df62
diff --git a/backend/migrator/migration/3.23/0000##review_run.sql b/backend/migrator/migration/3.23/0000##review_run.sql
index 0431a5e6e4..0c7aaf0e6d 100644
--- a/backend/migrator/migration/3.23/0000##review_run.sql
+++ b/backend/migrator/migration/3.23/0000##review_run.sql
@@ -3,14 +3,14 @@
-- not the slot's history). Results live in issue comments; the run carries
-- none. No standalone id on purpose: nothing may durably reference a run.
CREATE TABLE review_run (
- created_at timestamptz NOT NULL DEFAULT now(),
- updated_at timestamptz NOT NULL DEFAULT now(),
project text NOT NULL REFERENCES project(resource_id),
issue_id bigint NOT NULL,
-- Reviewer type: 'RULE' (standard rules) or 'GUIDELINE' (natural-language
-- guidelines, performed by AI). No CHECK on purpose: the reviewer-id space
-- is open.
type text NOT NULL,
+ created_at timestamptz NOT NULL DEFAULT now(),
+ updated_at timestamptz NOT NULL DEFAULT now(),
-- Attempt number of the current run, 0-based like task_run.attempt.
-- Bumped on every slot reset (issue created / SQL updated / manual
-- re-run); it counts triggers, not completed executions. The completion
diff --git a/backend/migrator/migration/LATEST.sql b/backend/migrator/migration/LATEST.sql
index f0ef1f8b0e..c988192423 100644
--- a/backend/migrator/migration/LATEST.sql
+++ b/backend/migrator/migration/LATEST.sql
@@ -376,14 +376,14 @@ CREATE UNIQUE INDEX idx_issue_comment_unique_resource_id ON issue_comment(resour
-- not the slot's history). Results live in issue comments; the run carries
-- none. No standalone id on purpose: nothing may durably reference a run.
CREATE TABLE review_run (
- created_at timestamptz NOT NULL DEFAULT now(),
- updated_at timestamptz NOT NULL DEFAULT now(),
project text NOT NULL REFERENCES project(resource_id),
issue_id bigint NOT NULL,
-- Reviewer type: 'RULE' (standard rules) or 'GUIDELINE' (natural-language
-- guidelines, performed by AI). No CHECK on purpose: the reviewer-id space
-- is open.
type text NOT NULL,
+ created_at timestamptz NOT NULL DEFAULT now(),
+ updated_at timestamptz NOT NULL DEFAULT now(),
-- Attempt number of the current run, 0-based like task_run.attempt.
-- Bumped on every slot reset (issue created / SQL updated / manual
-- re-run); it counts triggers, not completed executions. The completion