Skip to content

mig: drop sso_connection_id column from organization_metadata - #2247

Merged
qstearns merged 2 commits into
mainfrom
drop-sso-connection-id/schema
Jul 21, 2026
Merged

qstearns merged 2 commits into
mainfrom
drop-sso-connection-id/schema

Conversation

@qstearns

Copy link
Copy Markdown
Contributor

Follow-up to #2246. Drops the sso_connection_id column from organization_metadata after the behavior change has been running in production and the data migration has been executed.

@qstearns
qstearns requested a review from a team as a code owner April 16, 2026 04:59

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@changeset-bot

changeset-bot Bot commented Apr 16, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 8ae8565

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Apr 16, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
gram-docs-redirect Ready Ready Preview, Comment Apr 17, 2026 2:34am

Request Review

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

@qstearns
qstearns force-pushed the drop-sso-connection-id/behavior branch from 6003dcd to c08599c Compare April 16, 2026 05:09
@qstearns
qstearns force-pushed the drop-sso-connection-id/schema branch from c407c50 to bc44797 Compare April 16, 2026 05:12
@qstearns qstearns changed the title fix: drop sso_connection_id column from organization_metadata mig: drop sso_connection_id column from organization_metadata Apr 16, 2026
devin-ai-integration[bot]

This comment was marked as resolved.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

View 2 additional findings in Devin Review.

Open in Devin Review

@qstearns
qstearns force-pushed the drop-sso-connection-id/behavior branch from aee305f to 54ccee2 Compare April 17, 2026 00:01
@qstearns
qstearns requested a review from a team as a code owner April 17, 2026 00:01
@qstearns
qstearns force-pushed the drop-sso-connection-id/behavior branch 2 times, most recently from 729cb08 to 0617c5f Compare April 17, 2026 00:44
@qstearns
qstearns force-pushed the drop-sso-connection-id/schema branch from fc77c11 to 1e626bd Compare April 17, 2026 00:44
@qstearns
qstearns force-pushed the drop-sso-connection-id/behavior branch from 0617c5f to c89c02a Compare April 17, 2026 01:47
@qstearns
qstearns force-pushed the drop-sso-connection-id/schema branch from 1e626bd to 446273a Compare April 17, 2026 01:48
@qstearns
qstearns force-pushed the drop-sso-connection-id/behavior branch from c89c02a to a8f75b1 Compare April 17, 2026 02:17
@qstearns
qstearns force-pushed the drop-sso-connection-id/schema branch from 446273a to 715af1b Compare April 17, 2026 02:18
@qstearns
qstearns force-pushed the drop-sso-connection-id/schema branch from 715af1b to 2097ca5 Compare April 17, 2026 02:29
@qstearns
qstearns force-pushed the drop-sso-connection-id/behavior branch 2 times, most recently from 63acce0 to 2c5516b Compare April 17, 2026 02:33
@qstearns
qstearns force-pushed the drop-sso-connection-id/schema branch from 2097ca5 to eeb9bab Compare April 17, 2026 02:33
qstearns added a commit that referenced this pull request Apr 17, 2026
…de (#2246)

Remove all dependencies on `sso_connection_id`, there are no more
dependencies on it and it seems to confuse humans and Claude alike. This
PR changes behavior to target `workos_id` as a column instead of
`sso_connection_id`. After we merge it, we should run the following data
migration:

```sql
UPDATE organization_metadata
SET workos_id = sso_connection_id,
    updated_at = clock_timestamp()
WHERE sso_connection_id IS NOT NULL
  AND workos_id IS NULL;
```

There is [a follow-up
PR](#2247) to drop the column.
We first merge the behavior change and let it run for a couple days to
avoid risks of data loss.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Base automatically changed from drop-sso-connection-id/behavior to main April 17, 2026 02:40
bflad
bflad previously requested changes Jul 7, 2026

@bflad bflad left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR adds or modifies server/gen/http/openapi3.json, which was intentionally untracked on main in #3935. That file is a generated, single-line duplicate of openapi3.yaml that nothing consumes (the server embeds the yaml and Speakeasy reads the yaml), and it is ignored via .gitignore (line 36). Because it was tracked and ignored at the same time, it kept churning and producing rebase conflicts.

Merging this PR as-is would re-introduce the tracked file and revive that recurring conflict. Please drop it from this PR:

git rm --cached server/gen/http/openapi3.json
git commit -m "chore: stop tracking generated openapi3.json"

Rebasing on the latest main also resolves it. The file stays on disk and gitignored; openapi3.yaml remains the tracked, consumed artifact. Thanks!

@qstearns
qstearns force-pushed the drop-sso-connection-id/schema branch 3 times, most recently from 7a6d04a to e444fc2 Compare July 21, 2026 01:28
@qstearns
qstearns dismissed bflad’s stale review July 21, 2026 01:29

Addressed stale committed file

@qstearns
qstearns enabled auto-merge July 21, 2026 01:29
@github-actions

github-actions Bot commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

atlas migrate lint on server/migrations

Status Step Result
1 new migration file detected 20260721023354_drop-sso-connection-id.sql
ERD and visual diff generated View Visualization
No issues found View Report
Read the full linting report on Atlas Cloud

@qstearns qstearns added the skip-migration-check Skips migration hygiene check if required label Jul 21, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 7 files

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread server/migrations/atlas.sum Resolved
@qstearns
qstearns force-pushed the drop-sso-connection-id/schema branch from 1b2bd02 to af1b2cc Compare July 21, 2026 01:39
@github-actions

Copy link
Copy Markdown
Contributor

atlas migrate lint on server/clickhouse/migrations

Status Step Result
No migration files detected  
ERD and visual diff generated View Visualization
No issues found View Report
Read the full linting report on Atlas Cloud

qstearns and others added 2 commits July 20, 2026 19:35
Remove the column from the schema and add the corresponding migration.
The behavior change moving reads and writes onto workos_id shipped in
#2246 and has been running in production since April.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@qstearns
qstearns force-pushed the drop-sso-connection-id/schema branch from af1b2cc to 8ae8565 Compare July 21, 2026 02:36
@qstearns
qstearns added this pull request to the merge queue Jul 21, 2026
Merged via the queue into main with commit 5ecf2ab Jul 21, 2026
34 checks passed
@qstearns
qstearns deleted the drop-sso-connection-id/schema branch July 21, 2026 02:46
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

skip-migration-check Skips migration hygiene check if required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants