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.ts25
1 files changed, 1 insertions, 24 deletions
diff --git a/packages/db/schema.ts b/packages/db/schema.ts
index 769632d9..abfb374b 100644
--- a/packages/db/schema.ts
+++ b/packages/db/schema.ts
@@ -2,7 +2,6 @@ import type { AdapterAccount } from "@auth/core/adapters";
import { createId } from "@paralleldrive/cuid2";
import { relations } from "drizzle-orm";
import {
- blob,
index,
integer,
primaryKey,
@@ -158,9 +157,7 @@ export const bookmarkAssets = sqliteTable("bookmarkAssets", {
.$defaultFn(() => createId())
.references(() => bookmarks.id, { onDelete: "cascade" }),
assetType: text("assetType", { enum: ["image"] }).notNull(),
- assetId: text("assetId")
- .notNull()
- .references(() => assets.id, { onDelete: "cascade" }),
+ assetId: text("assetId").notNull(),
});
export const bookmarkTags = sqliteTable(
@@ -225,26 +222,6 @@ export const bookmarkLists = sqliteTable(
}),
);
-export const assets = sqliteTable(
- "assets",
- {
- id: text("id")
- .notNull()
- .primaryKey()
- .$defaultFn(() => createId()),
- userId: text("userId")
- .notNull()
- .references(() => users.id, { onDelete: "cascade" }),
- createdAt: createdAtField(),
- contentType: text("contentType").notNull(),
- encoding: text("encoding", { enum: ["binary"] }).notNull(),
- blob: blob("blob").notNull(),
- },
- (a) => ({
- userIdIdx: index("assets_userId_idx").on(a.userId),
- }),
-);
-
export const bookmarksInLists = sqliteTable(
"bookmarksInLists",
{