diff options
| author | codetorso <[email protected]> | 2024-07-20 07:17:25 +0530 |
|---|---|---|
| committer | codetorso <[email protected]> | 2024-07-20 07:17:25 +0530 |
| commit | 21fe55a96c36892fc50e8198248da825a5a4bd6f (patch) | |
| tree | 83832e20adb0e4acfa529ac624e7f2b914f7a25a /apps/web/server/db/schema.ts | |
| parent | fix links (diff) | |
| download | supermemory-torso.tar.xz supermemory-torso.zip | |
for god's sake this should work ;)torso
Diffstat (limited to 'apps/web/server/db/schema.ts')
| -rw-r--r-- | apps/web/server/db/schema.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/web/server/db/schema.ts b/apps/web/server/db/schema.ts index ae293a91..8d6157e9 100644 --- a/apps/web/server/db/schema.ts +++ b/apps/web/server/db/schema.ts @@ -193,7 +193,8 @@ export const chatThreads = createTable( userId: text("userId") .notNull() .references(() => users.id, { onDelete: "cascade" }), - }, + createdAt: integer("createdAt").notNull().$defaultFn(() => Math.floor(Date.now() / 1000)), // Use Unix timestamp + }, (thread) => ({ userIdx: index("chatThread_user_idx").on(thread.userId), }), |