Skip to content
Snippets Groups Projects
Commit bf594635 authored by Richard Fernando Heise Ferreira's avatar Richard Fernando Heise Ferreira
Browse files

Merge branch 'issue/74-add-id' into 'develop'

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

See merge request !76
parents bc31313c 9874294a
No related branches found
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