feat: polish envelopes (#2090)

## Description

The rest of the owl
This commit is contained in:
David Nguyen
2025-10-24 16:22:06 +11:00
committed by GitHub
parent 88836404d1
commit 03eb6af69a
141 changed files with 5171 additions and 2402 deletions

View File

@ -0,0 +1,20 @@
-- AlterTable
ALTER TABLE "SubscriptionClaim" ADD COLUMN "envelopeItemCount" INTEGER;
ALTER TABLE "OrganisationClaim" ADD COLUMN "envelopeItemCount" INTEGER;
-- Update ALL subscriptions to have 5 envelope items
UPDATE "SubscriptionClaim" SET "envelopeItemCount" = 5;
-- Override platform and enterprise claims to have 10 envelope items
UPDATE "SubscriptionClaim" SET "envelopeItemCount" = 10 WHERE "id" = 'platform';
UPDATE "SubscriptionClaim" SET "envelopeItemCount" = 10 WHERE "id" = 'enterprise';
-- Update ALL organisations to have 5 envelope items
UPDATE "OrganisationClaim" SET "envelopeItemCount" = 5;
-- Override platform and enterprise organisations to have 10 envelope items
UPDATE "OrganisationClaim" SET "envelopeItemCount" = 10 WHERE "originalSubscriptionClaimId" = 'platform';
UPDATE "OrganisationClaim" SET "envelopeItemCount" = 10 WHERE "originalSubscriptionClaimId" = 'enterprise';
ALTER TABLE "SubscriptionClaim" ALTER COLUMN "envelopeItemCount" SET NOT NULL;
ALTER TABLE "OrganisationClaim" ALTER COLUMN "envelopeItemCount" SET NOT NULL;

View File

@ -258,8 +258,9 @@ model SubscriptionClaim {
name String
locked Boolean @default(false)
teamCount Int
memberCount Int
teamCount Int
memberCount Int
envelopeItemCount Int
flags Json /// [ClaimFlags] @zod.custom.use(ZClaimFlagsSchema)
}
@ -273,8 +274,9 @@ model OrganisationClaim {
originalSubscriptionClaimId String?
organisation Organisation?
teamCount Int
memberCount Int
teamCount Int
memberCount Int
envelopeItemCount Int
flags Json /// [ClaimFlags] @zod.custom.use(ZClaimFlagsSchema)
}