diff options
| author | Frank <[email protected]> | 2026-01-04 22:46:21 -0500 |
|---|---|---|
| committer | Frank <[email protected]> | 2026-01-04 22:46:21 -0500 |
| commit | 9c55cb729bc28c86ca03f0e30e5ff19b4a0a8ea4 (patch) | |
| tree | 9477f06b571be2b69922a1f7912769133a7fc414 /packages/console/core/src/schema/billing.sql.ts | |
| parent | f2e65e40ea55e993cdbccaedb76e79d782175402 (diff) | |
| download | opencode-9c55cb729bc28c86ca03f0e30e5ff19b4a0a8ea4.tar.gz opencode-9c55cb729bc28c86ca03f0e30e5ff19b4a0a8ea4.zip | |
zen: add index
Diffstat (limited to 'packages/console/core/src/schema/billing.sql.ts')
| -rw-r--r-- | packages/console/core/src/schema/billing.sql.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/console/core/src/schema/billing.sql.ts b/packages/console/core/src/schema/billing.sql.ts index 6d1520d15..17cdd871d 100644 --- a/packages/console/core/src/schema/billing.sql.ts +++ b/packages/console/core/src/schema/billing.sql.ts @@ -1,4 +1,4 @@ -import { bigint, boolean, int, mysqlTable, uniqueIndex, varchar } from "drizzle-orm/mysql-core" +import { bigint, boolean, index, int, mysqlTable, uniqueIndex, varchar } from "drizzle-orm/mysql-core" import { timestamps, ulid, utc, workspaceColumns } from "../drizzle/types" import { workspaceIndexes } from "./workspace.sql" @@ -55,5 +55,5 @@ export const UsageTable = mysqlTable( cost: bigint("cost", { mode: "number" }).notNull(), keyID: ulid("key_id"), }, - (table) => [...workspaceIndexes(table)], + (table) => [...workspaceIndexes(table), index("usage_time_created").on(table.workspaceID, table.timeCreated)], ) |
