add group var to bookmarks

This commit is contained in:
Pas 2025-07-17 11:26:43 -06:00
parent d229a2fc84
commit ba50d9760b
4 changed files with 5 additions and 1 deletions

View file

@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "bookmarks" ADD COLUMN "group" TEXT;

View file

@ -1,3 +1,3 @@
# Please do not edit this file manually
# It should be added in your version-control system (e.g., Git)
provider = "postgresql"
provider = "postgresql"

View file

@ -13,6 +13,7 @@ model bookmarks {
user_id String @db.VarChar(255)
meta Json
updated_at DateTime @db.Timestamptz(0)
group String?
@@id([tmdb_id, user_id])
@@unique([tmdb_id, user_id], map: "bookmarks_tmdb_id_user_id_unique")

View file

@ -9,6 +9,7 @@ const bookmarkMetaSchema = z.object({
year: z.number(),
poster: z.string().optional(),
type: z.enum(['movie', 'show']),
group: z.string().optional(),
});
// Support both formats: direct fields or nested under meta