Skip to content

Add Postgres user deletion script#744

Merged
jahooma merged 1 commit into
mainfrom
jahooma/delete-user-data-script
May 24, 2026
Merged

Add Postgres user deletion script#744
jahooma merged 1 commit into
mainfrom
jahooma/delete-user-data-script

Conversation

@jahooma
Copy link
Copy Markdown
Contributor

@jahooma jahooma commented May 24, 2026

Adds a Postgres-only operational script for deleting a user by email or ID, with dry-run planning by default and an explicit --execute path.

The script cleans up or relies on cascades for messages, auth/session rows, billing tables, freebuff state, agent runs, referrals, org invite/repo references, and publisher-owned agent configs.

Owned organizations are guarded behind --delete-owned-orgs because that can remove shared org data.

Validation: bun --cwd scripts typecheck; bun scripts/delete-user.ts review-88fd7b56@example.com dry-run.

@jahooma jahooma force-pushed the jahooma/delete-user-data-script branch from 98ed5a9 to 9eeba84 Compare May 24, 2026 21:18
@jahooma jahooma merged commit 98d674e into main May 24, 2026
35 checks passed
@jahooma jahooma deleted the jahooma/delete-user-data-script branch May 24, 2026 21:21
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