From 1a8b494055f17d2fced59c0dc00f8364e4d042f3 Mon Sep 17 00:00:00 2001 From: Frank Date: Thu, 30 Oct 2025 14:12:49 -0400 Subject: wip: zen --- packages/console/core/script/reset-db.ts | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'packages/console/core/script/reset-db.ts') 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)) } -- cgit v1.2.3