Skip to content

fix(api): drop the api_keys.role column default - #2197

Open
multipletwigs wants to merge 1 commit into
mainfrom
bashtwigs/api-key-role-drop-default
Open

multipletwigs wants to merge 1 commit into
mainfrom
bashtwigs/api-key-role-drop-default

Conversation

@multipletwigs

@multipletwigs multipletwigs commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

Drops the api_keys.role column default, split out of #2182 because the migration compatibility policy only accepts a breaking migration in a migrations-only PR.

Schema before/after (reconstructed from 0001_initial_schema.sql):

before: role | text | not null | default 'api_developer'::text
after:  role | text | not null |

Verification: check:migration-compat passes locally; scanned all 59 INSERT INTO api_keys sites, none omit role. Migration not applied to a live DB; CI DB suites not run locally.

Every API-key create path now sends an explicit role, so the column
default only hides a missing role. Marked breaking: the previous image
relies on the default, so this ships alone after the explicit-role
change is deployed.
@vercel

vercel Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sdp-docs Ready Ready Preview Oct 4, 2026 2:35am UTC
sdp-web Ready Ready Preview Oct 4, 2026 2:35am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Critical risk] Database migration removes a column default.

The PR appears safe to merge based on the reviewed API-key creation paths.

Summary

Removes the PostgreSQL default from api_keys.role so inserts must supply a role explicitly.

  • The reviewed application create paths already provide that value.

Reviews (1) · Last reviewed commit: "fix(db): drop the api_keys.role default"

This branch was successfully deployed

2 active deployments
Preview – sdp-web — a3b028e7 Deployed Oct 4, 2026 by vercel[bot]
Preview – sdp-docs — a3b028e7 Deployed Oct 4, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant