diff options
| author | David Hill <[email protected]> | 2025-10-30 22:53:00 +0000 |
|---|---|---|
| committer | David Hill <[email protected]> | 2025-10-30 22:53:00 +0000 |
| commit | 2f9f189f390401b3314c74bd9f83e64b2420cd65 (patch) | |
| tree | b275ca785719a54115752a79d4b66984ba125670 /packages/console/core/script/reset-db.ts | |
| parent | f3c70f4ea8818bde5b1228482f72af9b10c71796 (diff) | |
| parent | a3ba740de41eb1e4825a99dc8f519e1225357e55 (diff) | |
| download | opencode-2f9f189f390401b3314c74bd9f83e64b2420cd65.tar.gz opencode-2f9f189f390401b3314c74bd9f83e64b2420cd65.zip | |
Merge branch 'dev' of https://github.com/sst/opencode into dev
Diffstat (limited to 'packages/console/core/script/reset-db.ts')
| -rw-r--r-- | packages/console/core/script/reset-db.ts | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/packages/console/core/script/reset-db.ts b/packages/console/core/script/reset-db.ts index 96ecf14e7..bd00e1962 100644 --- a/packages/console/core/script/reset-db.ts +++ b/packages/console/core/script/reset-db.ts @@ -1,13 +1,21 @@ import { Resource } from "@opencode-ai/console-resource" -import { Database } from "@opencode-ai/console-core/drizzle/index.js" -import { UserTable } from "@opencode-ai/console-core/schema/user.sql.js" -import { AccountTable } from "@opencode-ai/console-core/schema/account.sql.js" -import { WorkspaceTable } from "@opencode-ai/console-core/schema/workspace.sql.js" -import { BillingTable, PaymentTable, UsageTable } from "@opencode-ai/console-core/schema/billing.sql.js" -import { KeyTable } from "@opencode-ai/console-core/schema/key.sql.js" +import { Database } from "../src/drizzle/index.js" +import { UserTable } from "../src/schema/user.sql.js" +import { AccountTable } from "../src/schema/account.sql.js" +import { WorkspaceTable } from "../src/schema/workspace.sql.js" +import { BillingTable, PaymentTable, UsageTable } from "../src/schema/billing.sql.js" +import { KeyTable } from "../src/schema/key.sql.js" if (Resource.App.stage !== "frank") throw new Error("This script is only for frank") -for (const table of [AccountTable, BillingTable, KeyTable, PaymentTable, UsageTable, UserTable, WorkspaceTable]) { +for (const table of [ + AccountTable, + BillingTable, + KeyTable, + PaymentTable, + UsageTable, + UserTable, + WorkspaceTable, +]) { await Database.use((tx) => tx.delete(table)) } |
