diff options
Diffstat (limited to 'packages/console/core/src/schema/billing.sql.ts')
| -rw-r--r-- | packages/console/core/src/schema/billing.sql.ts | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/packages/console/core/src/schema/billing.sql.ts b/packages/console/core/src/schema/billing.sql.ts index f1300f849..56b2ef33b 100644 --- a/packages/console/core/src/schema/billing.sql.ts +++ b/packages/console/core/src/schema/billing.sql.ts @@ -21,16 +21,17 @@ export const BillingTable = mysqlTable( reloadError: varchar("reload_error", { length: 255 }), timeReloadError: utc("time_reload_error"), timeReloadLockedTill: utc("time_reload_locked_till"), + subscription: json("subscription").$type<{ + status: "subscribed" + coupon?: string + seats: number + plan: "20" | "100" | "200" + }>(), subscriptionID: varchar("subscription_id", { length: 28 }), - subscriptionCouponID: varchar("subscription_coupon_id", { length: 28 }), subscriptionPlan: mysqlEnum("subscription_plan", ["20", "100", "200"] as const), timeSubscriptionBooked: utc("time_subscription_booked"), }, - (table) => [ - ...workspaceIndexes(table), - uniqueIndex("global_customer_id").on(table.customerID), - uniqueIndex("global_subscription_id").on(table.subscriptionID), - ], + (table) => [...workspaceIndexes(table), uniqueIndex("global_customer_id").on(table.customerID)], ) export const SubscriptionTable = mysqlTable( |
