the universal sandbox runtime for agents and humans.
pocketenv.io
sandbox
openclaw
agent
claude-code
vercel-sandbox
deno-sandbox
cloudflare-sandbox
atproto
sprites
daytona
1import { type InferInsertModel, type InferSelectModel, sql } from "drizzle-orm";
2import { pgTable, text, timestamp, uniqueIndex } from "drizzle-orm/pg-core";
3import sandboxes from "./sandboxes";
4import users from "./users";
5
6const denoAuth = pgTable(
7 "deno_auth",
8 {
9 id: text("id").primaryKey().default(sql`xata_id()`),
10 sandboxId: text("sandbox_id")
11 .notNull()
12 .references(() => sandboxes.id, { onDelete: "cascade" }),
13 deployToken: text("deploy_token").notNull(),
14 userId: text("user_id")
15 .notNull()
16 .references(() => users.id),
17 redactedDenoToken: text("redacted_deno_token").notNull(),
18 createdAt: timestamp("created_at").defaultNow().notNull(),
19 },
20 (t) => [uniqueIndex("unique_deno_auth").on(t.sandboxId, t.userId)],
21);
22
23export type SelectDenoAuth = InferSelectModel<typeof denoAuth>;
24export type InsertDenoAuth = InferInsertModel<typeof denoAuth>;
25
26export default denoAuth;