aboutsummaryrefslogtreecommitdiffstats
path: root/packages/db/schema.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/db/schema.ts')
-rw-r--r--packages/db/schema.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/db/schema.ts b/packages/db/schema.ts
index f4a2ee75..c11f3b92 100644
--- a/packages/db/schema.ts
+++ b/packages/db/schema.ts
@@ -181,11 +181,15 @@ export const assets = sqliteTable(
bookmarkId: text("bookmarkId")
.notNull()
.references(() => bookmarks.id, { onDelete: "cascade" }),
+ userId: text("userId")
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
},
(tb) => ({
bookmarkIdIdx: index("assets_bookmarkId_idx").on(tb.bookmarkId),
assetTypeIdx: index("assets_assetType_idx").on(tb.assetType),
+ userIdIdx: index("assets_userId_idx").on(tb.userId),
}),
);