diff options
| author | Frank <[email protected]> | 2025-09-28 13:07:33 -0400 |
|---|---|---|
| committer | Frank <[email protected]> | 2025-09-28 19:55:40 -0400 |
| commit | e3a7096e447d3e9b217f870da4623fab34298479 (patch) | |
| tree | 1ef2e92e81ab82e2910609826c7fb420426afcc3 /packages/console/scripts | |
| parent | c148f10bbd0c5a59160050218bcc850c9fb58056 (diff) | |
| download | opencode-e3a7096e447d3e9b217f870da4623fab34298479.tar.gz opencode-e3a7096e447d3e9b217f870da4623fab34298479.zip | |
wip: zen
Diffstat (limited to 'packages/console/scripts')
| -rw-r--r-- | packages/console/scripts/src/reset.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/packages/console/scripts/src/reset.ts b/packages/console/scripts/src/reset.ts new file mode 100644 index 000000000..c84bd6936 --- /dev/null +++ b/packages/console/scripts/src/reset.ts @@ -0,0 +1,13 @@ +import { Resource } from "@opencode/console-resource" +import { Database } from "@opencode/console-core/drizzle/index.js" +import { UserTable } from "@opencode/console-core/schema/user.sql.js" +import { AccountTable } from "@opencode/console-core/schema/account.sql.js" +import { WorkspaceTable } from "@opencode/console-core/schema/workspace.sql.js" +import { BillingTable, PaymentTable, UsageTable } from "@opencode/console-core/schema/billing.sql.js" +import { KeyTable } from "@opencode/console-core/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]) { + await Database.use((tx) => tx.delete(table)) +} |
