summaryrefslogtreecommitdiffhomepage
path: root/packages/console/core/src/schema
diff options
context:
space:
mode:
Diffstat (limited to 'packages/console/core/src/schema')
-rw-r--r--packages/console/core/src/schema/billing.sql.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/console/core/src/schema/billing.sql.ts b/packages/console/core/src/schema/billing.sql.ts
index ba8f89280..6d96fc7eb 100644
--- a/packages/console/core/src/schema/billing.sql.ts
+++ b/packages/console/core/src/schema/billing.sql.ts
@@ -67,7 +67,7 @@ export const PaymentTable = mysqlTable(
timeRefunded: utc("time_refunded"),
enrichment: json("enrichment").$type<
| {
- type: "subscription"
+ type: "subscription" | "lite"
couponID?: string
}
| {
@@ -93,8 +93,9 @@ export const UsageTable = mysqlTable(
cacheWrite1hTokens: int("cache_write_1h_tokens"),
cost: bigint("cost", { mode: "number" }).notNull(),
keyID: ulid("key_id"),
+ sessionID: varchar("session_id", { length: 30 }),
enrichment: json("enrichment").$type<{
- plan: "sub"
+ plan: "sub" | "byok" | "lite"
}>(),
},
(table) => [...workspaceIndexes(table), index("usage_time_created").on(table.workspaceID, table.timeCreated)],