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 } from "drizzle-orm/pg-core";
3import sandboxes from "./sandboxes";
4
5const backups = pgTable("backups", {
6 id: text("id").primaryKey().default(sql`xata_id()`),
7 sandboxId: text("sandbox_id")
8 .notNull()
9 .references(() => sandboxes.id, { onDelete: "cascade" }),
10 backupId: text("backup_id").notNull(),
11 directory: text("directory").notNull(),
12 description: text("description"),
13 expiresAt: timestamp("expires_at"),
14 createdAt: timestamp("created_at").defaultNow().notNull(),
15});
16
17export type SelectBackup = InferSelectModel<typeof backups>;
18export type InsertBackup = InferInsertModel<typeof backups>;
19
20export default backups;