Add primary key to FilesForMachinesTable
Introduce a primary key field 'id' with UUID type to the FilesForMachinesTable. This ensures each record is uniquely identifiable and improves database integrity. Additionally, set a default value to a random UUID for new entries.
This commit is contained in:
parent
b182d740bd
commit
711877bf60
@ -153,6 +153,8 @@ export const MachinesTable = pgTable("machines", {
|
||||
|
||||
//TODO Many to Many table betwen File en Machine
|
||||
export const FilesForMachinesTable = pgTable("files_for_machines", {
|
||||
id: p.uuid('id').primaryKey().notNull().defaultRandom(),
|
||||
|
||||
fileId: p
|
||||
.uuid("file_id")
|
||||
.notNull()
|
||||
|
Loading…
x
Reference in New Issue
Block a user