Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dabb2ae303
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "created_at" TIMESTAMP NOT NULL DEFAULT (NOW() AT TIME ZONE 'UTC'), | ||
| "admin_user_id" BIGINT REFERENCES "cauldron"."app_user"(id), | ||
| "repo_mode" VARCHAR(10) DEFAULT 'all', | ||
| "repo_mode" VARCHAR(10) NOT NULL DEFAULT 'all' CHECK (repo_mode IN ('all', 'selected')), |
There was a problem hiding this comment.
Ship this constraint in a new migration
For databases that have already applied version 11, changing 000011_github_org_settings.up.sql is a no-op: cmd/migrator/main.go:19-24 only calls m.Up(), so previously recorded migrations are not re-run. In other words, every existing deployment that already created cauldron.github_org_settings will continue accepting NULL or unsupported repo_mode values, and only fresh installs get the new constraint. This needs to be an ALTER TABLE in a new numbered migration if the goal is to harden upgraded environments too.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Pull request overview
Adds stronger data integrity constraints to the cauldron.github_org_settings.repo_mode column so only supported modes are persisted.
Changes:
- Make
repo_modeNOT NULLwith default'all'. - Add a
CHECKconstraint restrictingrepo_modeto('all', 'selected').
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "created_at" TIMESTAMP NOT NULL DEFAULT (NOW() AT TIME ZONE 'UTC'), | ||
| "admin_user_id" BIGINT REFERENCES "cauldron"."app_user"(id), | ||
| "repo_mode" VARCHAR(10) DEFAULT 'all', | ||
| "repo_mode" VARCHAR(10) NOT NULL DEFAULT 'all' CHECK (repo_mode IN ('all', 'selected')), |
No description provided.