twentyhq / twenty

Building a modern alternative to Salesforce, powered by the community.
https://twenty.com
Other
20.13k stars 2.24k forks source link

Introduce SUSPENDED and DELETED workspaceStatus #6674

Open charlesBochet opened 2 months ago

charlesBochet commented 2 months ago

Scope & Context

  1. New enum Current Statuses: PENDING_CREATION, ONGOING_CREATION, ACTIVE, INACTIVE New Statuses: PENDING_CREATION, ONGOING_CREATION, ACTIVE, SUSPENDED, DELETED

  2. Data Migration:

    • INACTIVE workspaces that do not have an existing dataSource should be DELETED
    • INACTIVE workspaces that have one should be SUSPENDED
  3. Business logic updates on Subscription:

    • when a subscription is canceled, put to SUSPENDED
    • when a subscription is re-activated and the workspace is SUSPENDED, re-activate
    • when a subscription is re-activated and the workspace is DELETED, pass in PENDING_CREATION
  4. Make (fix) the command to delete suspended workspaces

  5. Update sync-metadata command to also sync suspended workspaces

  6. Update onboarding Status with PLAN_CANCELED and stop checking subscriptions in the FE. Double check redirections in PageChangeEffect

thomtrp commented 2 months ago

To be discussed DELETED, should be completely remove of soft delete

charlesBochet commented 2 months ago

Check what happens when we delete a workspace