diff --git a/src/db/relations/item-achivements.relation.ts b/src/db/relations/item-achivements.relation.ts index d57074c1d3bd092d68a1cdfbd38626b3bc0c69ad..4dc79118891730bc41474a28d2beada3d6b398e5 100644 --- a/src/db/relations/item-achivements.relation.ts +++ b/src/db/relations/item-achivements.relation.ts @@ -1,4 +1,4 @@ -import { integer, pgTable, primaryKey } from "drizzle-orm/pg-core"; +import { integer, pgTable, primaryKey, serial } from "drizzle-orm/pg-core"; import achievementTable from "../schema/achievements.schema"; import { createInsertSchema, createSelectSchema } from "drizzle-zod"; import type { z } from "zod"; @@ -7,6 +7,9 @@ import { itemsTable } from "../schema"; const itemAchievementsTable = pgTable("item_achievements", { + id: serial('id').primaryKey() + .unique() + .notNull(), item_id: integer("item_id") .notNull() .references(() => itemsTable.id, { onDelete: "cascade" }),