From 44dab5ba118a216a4394726c253e513a9edc98fc Mon Sep 17 00:00:00 2001 From: Mathis Date: Tue, 8 Oct 2024 16:33:41 +0200 Subject: [PATCH] Add primary key to FilesTypeForMachine table Added a new 'id' column as the primary key with a unique constraint and default random value generation for the 'FilesTypeForMachine' table. This ensures each row has a unique identifier. --- apps/backend/src/app/db/schema.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/backend/src/app/db/schema.ts b/apps/backend/src/app/db/schema.ts index 1db1433..fc6d47c 100644 --- a/apps/backend/src/app/db/schema.ts +++ b/apps/backend/src/app/db/schema.ts @@ -170,6 +170,8 @@ export const FilesForMachinesTable = pgTable("files_for_machines", { }); export const FilesTypeForMachine = pgTable("f_type_for_machines", { + id: p.uuid("id").unique().primaryKey().defaultRandom().notNull(), + machineId: p .uuid("machine_id") .notNull()