mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-10 07:27:57 -05:00
fix(team-plans): track departed member usage so value not lost (#2118)
* fix(team-plans): track departed member usage so value not lost * reset usage to 0 when they leave team * prep merge with stagig * regen migrations * fix org invite + ws selection' --------- Co-authored-by: Waleed <walif6@gmail.com>
This commit is contained in:
committed by
GitHub
parent
7bf9251db1
commit
fc5f815c7a
1
packages/db/migrations/0114_wise_sunfire.sql
Normal file
1
packages/db/migrations/0114_wise_sunfire.sql
Normal file
@@ -0,0 +1 @@
|
||||
ALTER TABLE "organization" ADD COLUMN "departed_member_usage" numeric DEFAULT '0' NOT NULL;
|
||||
7695
packages/db/migrations/meta/0114_snapshot.json
Normal file
7695
packages/db/migrations/meta/0114_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -792,6 +792,13 @@
|
||||
"when": 1764370369484,
|
||||
"tag": "0113_calm_tiger_shark",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 114,
|
||||
"version": "7",
|
||||
"when": 1764468360258,
|
||||
"tag": "0114_wise_sunfire",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -745,7 +745,8 @@ export const organization = pgTable('organization', {
|
||||
logo: text('logo'),
|
||||
metadata: json('metadata'),
|
||||
orgUsageLimit: decimal('org_usage_limit'),
|
||||
storageUsedBytes: bigint('storage_used_bytes', { mode: 'number' }).notNull().default(0), // Storage tracking for team/enterprise
|
||||
storageUsedBytes: bigint('storage_used_bytes', { mode: 'number' }).notNull().default(0),
|
||||
departedMemberUsage: decimal('departed_member_usage').notNull().default('0'),
|
||||
createdAt: timestamp('created_at').defaultNow().notNull(),
|
||||
updatedAt: timestamp('updated_at').defaultNow().notNull(),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user