summaryrefslogtreecommitdiffhomepage
path: root/packages/console/core/src/schema/billing.sql.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/console/core/src/schema/billing.sql.ts')
-rw-r--r--packages/console/core/src/schema/billing.sql.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/console/core/src/schema/billing.sql.ts b/packages/console/core/src/schema/billing.sql.ts
index 8210bc152..42da13776 100644
--- a/packages/console/core/src/schema/billing.sql.ts
+++ b/packages/console/core/src/schema/billing.sql.ts
@@ -23,7 +23,11 @@ export const BillingTable = mysqlTable(
timeReloadLockedTill: utc("time_reload_locked_till"),
subscriptionID: varchar("subscription_id", { length: 28 }),
},
- (table) => [...workspaceIndexes(table), uniqueIndex("global_customer_id").on(table.customerID)],
+ (table) => [
+ ...workspaceIndexes(table),
+ uniqueIndex("global_customer_id").on(table.customerID),
+ uniqueIndex("global_subscription_id").on(table.subscriptionID),
+ ],
)
export const PaymentTable = mysqlTable(