Repository navigation
feat(store): organization delete keeps the row and frees its name - #1973
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 3 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Coverage Report for CI Build 38235878862Coverage remained the same at 54.41%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
rohilsurana
marked this pull request as ready for review
October 9, 2026 08:40
rohilsurana
force-pushed
the
feat/deleter-removes-org-domains-and-pats
branch
from
October 9, 2026 10:23
ae9a41e to
eec1053
Compare
rohilsurana
force-pushed
the
feat/org-row-soft-delete
branch
from
October 9, 2026 10:23
e777a73 to
6b1fbfd
Compare
This was referenced Oct 9, 2026
AmanGIT07
approved these changes
Oct 12, 2026
rohilsurana
force-pushed
the
feat/deleter-removes-org-domains-and-pats
branch
from
October 12, 2026 10:11
eec1053 to
d4aeb36
Compare
rohilsurana
force-pushed
the
feat/org-row-soft-delete
branch
from
October 12, 2026 10:11
6b1fbfd to
144374a
Compare
rohilsurana
force-pushed
the
feat/deleter-removes-org-domains-and-pats
branch
from
October 12, 2026 10:18
d4aeb36 to
9218314
Compare
rohilsurana
force-pushed
the
feat/org-row-soft-delete
branch
from
October 12, 2026 10:18
144374a to
614bec4
Compare
…omains and policies
rohilsurana
force-pushed
the
feat/org-row-soft-delete
branch
from
October 12, 2026 10:22
614bec4 to
4b13c1e
Compare
Base automatically changed from
feat/deleter-removes-org-domains-and-pats
to
main
October 13, 2026 07:05
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
deleted_aton the row instead of removing it. Reads already skip such rows, and the name is free again, so a new org can take it.Why
The deleter now removes the org's domains and personal access tokens itself (previous PR), so the row no longer has to go for the database cascade to run. Keeping the row also means the foreign keys from billing, projects, groups, invitations and kyc cannot block or fail the delete while those tables move to soft delete.
The org row is still the last step. A failure earlier leaves a live org that can be deleted again.
Depends on
This branch is stacked on the PR that makes the deleter remove domains and tokens before the org row. It also needs the small PR that makes two admin lists (org search and the kyc list) skip deleted orgs, so a deleted org does not show up there.
Side effect
The
organization.deleteaudit record now carries a real delete time. After a hard delete the time was empty.Not in this PR
The trigger
trg_serviceusers_block_org_deletefires on DELETE only, so it stops guarding anything. It is dropped by the service user soft delete work.Release note
This release starts writing
deleted_atonorganizations. The read filters for organizations, domains and personal access tokens, and the admin list fix above, must already be deployed in the target environment before this tag goes out. Ship it together with the PR that makes the org delete also remove disabled projects and groups (#1976). Without that PR, an org with a disabled project or group would be soft deleted and those children would stay live. No new migration. Deploy to dev, then staging, then prod.Tests