aboutsummaryrefslogtreecommitdiff
path: root/apps/web/src
diff options
context:
space:
mode:
authorDhravya <[email protected]>2024-04-02 18:30:53 -0700
committerDhravya <[email protected]>2024-04-02 18:30:53 -0700
commitf8a917a89893612048959dd06affa435d1369302 (patch)
tree32cab1877b64a3f53c75ab6eff62b3448b247a5a /apps/web/src
parentadded category support: add and search (diff)
downloadsupermemory-f8a917a89893612048959dd06affa435d1369302.tar.xz
supermemory-f8a917a89893612048959dd06affa435d1369302.zip
added category support in d1 db, changed schema
Diffstat (limited to 'apps/web/src')
-rw-r--r--apps/web/src/server/db/schema.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/web/src/server/db/schema.ts b/apps/web/src/server/db/schema.ts
index 55a2ea1e..592f88be 100644
--- a/apps/web/src/server/db/schema.ts
+++ b/apps/web/src/server/db/schema.ts
@@ -114,6 +114,7 @@ export const storedContent = createTable(
title: text("title", { length: 255 }),
description: text("description", { length: 255 }),
url: text("url").notNull().unique(),
+ category: text("category", { length: 255 }),
savedAt: int("savedAt", { mode: "timestamp" }).notNull(),
baseUrl: text("baseUrl", { length: 255 }),
image: text("image", { length: 255 }),
@@ -122,6 +123,7 @@ export const storedContent = createTable(
urlIdx: index("storedContent_url_idx").on(sc.url),
savedAtIdx: index("storedContent_savedAt_idx").on(sc.savedAt),
titleInx: index("storedContent_title_idx").on(sc.title),
+ categoryIdx: index("storedContent_category_idx").on(sc.category),
}),
);