Skip to content

Delete public user accounts - #974

Merged
hartsick merged 1 commit into
mainfrom
delete-public-accounts
Mar 19, 2026
Merged

hartsick merged 1 commit into
mainfrom
delete-public-accounts

Conversation

@hartsick

@hartsick hartsick commented Mar 18, 2026 •

Copy link
Copy Markdown
Member

But keep the admins.

.delete_all intentionally skips activemodel callbacks

I tested this locally on small set of test data. Would appreciate a lookover to make sure:

  1. there aren't any other accounts we should exclude from deletion
  2. confirm we shouldn't run callbacks on deletion (I skipped them because it felt too risky/destructive)
  3. any other gotchas I'm missing

Task can be ran as bin/rake users:delete_nonadmins

@hartsick
hartsick requested a review from esoterik March 18, 2026 22:52
@hartsick
hartsick force-pushed the delete-public-accounts branch from 418d31b to 8c4e1ce Compare March 18, 2026 22:56

@esoterik esoterik 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.

The analytics page in the admin still loads fine after running this and shows data, so I think this is good to merge! The deletion took < 30s on my local db, which is a dump from october 2023 or 2024, so hopefully shouldn't take too long on prod.

@hartsick

Copy link
Copy Markdown
Member Author

thank you!!

@hartsick
hartsick merged commit 34381fc into main Mar 19, 2026
2 checks passed
@hartsick
hartsick deleted the delete-public-accounts branch March 19, 2026 21:56
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.

2 participants