Skip to content

feat: enable soft delete for organizations #16584

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 33 commits into from
Feb 24, 2025
Merged

Conversation

jaaydenh
Copy link
Contributor

@jaaydenh jaaydenh commented Feb 16, 2025

  • Add deleted column to organizations table
  • Add trigger to check for existing workspaces, templates, groups and members in a org before allowing the soft delete

@jaaydenh jaaydenh self-assigned this Feb 16, 2025
@jaaydenh jaaydenh force-pushed the jaaydenh/orgs-soft-delete branch from 87af79e to 44a9cad Compare February 18, 2025 11:38
@jaaydenh jaaydenh requested a review from Emyrk February 18, 2025 15:09
@jaaydenh jaaydenh force-pushed the jaaydenh/orgs-soft-delete branch from 6d8239c to 083bf7f Compare February 19, 2025 22:10
@jaaydenh jaaydenh force-pushed the jaaydenh/orgs-soft-delete branch from f23940d to 70bf5e3 Compare February 21, 2025 17:35
@jaaydenh jaaydenh requested a review from Emyrk February 21, 2025 17:36
@jaaydenh jaaydenh marked this pull request as ready for review February 21, 2025 17:36
-- * the organization has 1 or more groups other than "Everyone" group
-- * the organization has 1 or more members other than the organization owner

IF (workspace_count + template_count) > 0 THEN
Copy link
Contributor Author

@jaaydenh jaaydenh Feb 21, 2025

Choose a reason for hiding this comment

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

it feels like such a long error message if this is combined into one exception. In the future the FE should let the user know what resources exist before deleting

Copy link
Member

Choose a reason for hiding this comment

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

We can improve the error handling in golang up front in the future and improve the UX on failures.

Copy link
Member

@Emyrk Emyrk left a comment

Choose a reason for hiding this comment

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

Once tests are in, I will ✔️

(Jaayden and I went over the trigger together in a call)

Co-authored-by: Steven Masley <Emyrk@users.noreply.github.com>
@jaaydenh jaaydenh merged commit 546a549 into main Feb 24, 2025
35 checks passed
@jaaydenh jaaydenh deleted the jaaydenh/orgs-soft-delete branch February 24, 2025 17:59
@github-actions github-actions bot locked and limited conversation to collaborators Feb 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants