Skip to content
Snippets Groups Projects
Commit 9874294a authored by jsk22's avatar jsk22
Browse files

Issue #74/ ADD id to item-achivements-relation

parent bc31313c
Branches
No related tags found
1 merge request!76Issue #74/ ADD id to item-achivements-relation
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" }),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment