diff --git a/backend/database/src/schema.ts b/backend/database/src/schema.ts index 4403b96..e350d79 100644 --- a/backend/database/src/schema.ts +++ b/backend/database/src/schema.ts @@ -31,7 +31,7 @@ export const sandbox = sqliteTable("sandbox", { createdAt: integer("createdAt", { mode: "timestamp_ms" }), userId: text("user_id") .notNull() - .references(() => user.id), + .references(() => user.id, { onDelete: "cascade" }), }); export type Sandbox = typeof sandbox.$inferSelect;