fix: sandboxes linked with users

This commit is contained in:
Akhilesh Rangani 2024-06-16 19:05:24 -04:00
parent d28c0cbea6
commit 95a92bbc4c

View File

@ -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;