From 52fbd16e08fe59d2d0a7a588dfa565a8ff2d2c95 Mon Sep 17 00:00:00 2001 From: Frank Date: Thu, 8 Jan 2026 19:24:20 -0500 Subject: wip: zen wip: zen --- packages/console/core/src/schema/billing.sql.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'packages/console/core/src/schema/billing.sql.ts') diff --git a/packages/console/core/src/schema/billing.sql.ts b/packages/console/core/src/schema/billing.sql.ts index 42da13776..f56cf4182 100644 --- a/packages/console/core/src/schema/billing.sql.ts +++ b/packages/console/core/src/schema/billing.sql.ts @@ -30,6 +30,20 @@ export const BillingTable = mysqlTable( ], ) +export const SubscriptionTable = mysqlTable( + "subscription", + { + ...workspaceColumns, + ...timestamps, + userID: ulid("user_id").notNull(), + rollingUsage: bigint("rolling_usage", { mode: "number" }), + fixedUsage: bigint("fixed_usage", { mode: "number" }), + timeRollingUpdated: utc("time_rolling_updated"), + timeFixedUpdated: utc("time_fixed_updated"), + }, + (table) => [...workspaceIndexes(table), uniqueIndex("workspace_user_id").on(table.workspaceID, table.userID)], +) + export const PaymentTable = mysqlTable( "payment", { -- cgit v1.2.3