mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-23 20:13:21 +03:00
028e5cd940
**TLDR:** Solves (https://github.com/twentyhq/private-issues/issues/212) Add command to sync customer data from stripe to BillingCustomerTable for all active workspaces. Drop foreign key contraint on billingCustomer in BillingSubscription (in order to not break the DB). **In order to test:** - Billing should be enabled - Have some workspaces that are active and whose id's are not mentioned in BillingCustomer (but the customer are present in stripe). Run the command: `npx nx run twenty-server:command billing:sync-customer-data` Take into consideration Due that all the previous subscriptions in Stripe have the workspaceId in their metadata, we use that information as source of true for the data sync **Things to do:** - Add tests for Billing utils - Separate StripeService into multipleServices (stripeSubscriptionService, stripePriceService etc) perhaps add them in (https://github.com/twentyhq/private-issues/issues/201)? |
||
---|---|---|
.. | ||
@types | ||
patches | ||
scripts | ||
src | ||
test/integration | ||
.env.example | ||
.env.test | ||
.eslintrc.cjs | ||
.gitignore | ||
.prettierignore | ||
.prettierrc | ||
.swcrc | ||
jest-integration.config.ts | ||
jest.config.ts | ||
nest-cli.json | ||
package.json | ||
project.json | ||
tsconfig.build.json | ||
tsconfig.json | ||
tsconfig.scripts.json |