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.
This commit is contained in:
Mathis H (Avnyr) 2024-10-08 16:33:41 +02:00
parent 7876bc2c38
commit 44dab5ba11
Signed by: Mathis
GPG Key ID: DD9E0666A747D126

View File

@ -170,6 +170,8 @@ export const FilesForMachinesTable = pgTable("files_for_machines", {
}); });
export const FilesTypeForMachine = pgTable("f_type_for_machines", { export const FilesTypeForMachine = pgTable("f_type_for_machines", {
id: p.uuid("id").unique().primaryKey().defaultRandom().notNull(),
machineId: p machineId: p
.uuid("machine_id") .uuid("machine_id")
.notNull() .notNull()