open, interoperable sandbox platform for agents and humans 📦 ✨
pocketenv.io
claude-code
atproto
sandbox
openclaw
agent
1import { type InferInsertModel, type InferSelectModel, sql } from "drizzle-orm";
2import { pgTable, text, timestamp, uniqueIndex } from "drizzle-orm/pg-core";
3import sandboxes from "./sandboxes";
4
5const integrations = pgTable(
6 "integrations",
7 {
8 id: text("id").primaryKey().default(sql`xata_id()`),
9 sandboxId: text("sandbox_id")
10 .notNull()
11 .references(() => sandboxes.id),
12 name: text("name").notNull(),
13 description: text("description"),
14 webhookUrl: text("webhook_url").notNull(),
15 createdAt: timestamp("created_at").defaultNow().notNull(),
16 },
17 (t) => [uniqueIndex("unique_sandbox_integration").on(t.sandboxId, t.name)],
18);
19
20export type SelectIntegration = InferSelectModel<typeof integrations>;
21export type InsertIntegration = InferInsertModel<typeof integrations>;
22
23export default integrations;