Skip to content
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

6431 create new field activationStatus inside workspace table #6439

Merged
merged 9 commits into from
Jul 30, 2024

Conversation

bosiraphael
Copy link
Contributor

Closes #6431

  • create new field activationStatus
  • create migration commands
  • add logic to update activationStatus on workspace activation and on stripe subscriptionStatus change

@bosiraphael bosiraphael linked an issue Jul 29, 2024 that may be closed by this pull request
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Introduced a new activationStatus field to the workspace table, along with necessary migrations and logic updates to ensure consistent status tracking.

  • Added WorkspaceActivationStatus enum and updated Workspace type in packages/twenty-front/src/generated/graphql.tsx.
  • Updated workspace activation logic in packages/twenty-server/src/engine/core-modules/workspace/services/workspace.service.ts.
  • Added migration 1722256203539-addActivationStatus.ts in packages/twenty-server/src/database/typeorm/core/migrations/.
  • Integrated activationStatus updates in packages/twenty-server/src/engine/core-modules/billing/billing.workspace-service.ts.
  • Created SetWorkspaceActivationStatusCommand in packages/twenty-server/src/database/commands/upgrade-version/0-23/0-23-set-workspace-activation-status.command.ts.

16 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings

Comment on lines +53 to +60
let activeSubscriptionWorkspaceIds: string[] = [];

if (options.workspaceId) {
activeSubscriptionWorkspaceIds = [options.workspaceId];
} else {
activeSubscriptionWorkspaceIds =
await this.billingService.getActiveSubscriptionWorkspaceIds();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Logic: Consider adding error handling for the getActiveSubscriptionWorkspaceIds method to handle potential failures gracefully.

Copy link
Member

@charlesBochet charlesBochet left a comment

Choose a reason for hiding this comment

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

LGTM

@bosiraphael bosiraphael merged commit cd4263f into main Jul 30, 2024
14 checks passed
@bosiraphael bosiraphael deleted the 6431-create-new-field-status-inside-workspace-table branch July 30, 2024 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create new column activationStatus inside workspace table
2 participants