BFARIAAL / api-pdc-backend

API PDC backedncode
1 stars 1 forks source link

57 development introduce assembly plant information to the vehicle #58

Open pedro-acsousa opened 9 months ago

pedro-acsousa commented 9 months ago

ALTER TABLE d42-api-pdc.vehicles ADD COLUMN assembly_plant VARCHAR(45) NULL AFTER status;

ALTER TABLE d42-api-pdc.vehicles ADD INDEX Fk_assembly_plant_idx (assembly_plant ASC); ; ALTER TABLE d42-api-pdc.vehicles ADD CONSTRAINT Fk_assembly_plant FOREIGN KEY (assembly_plant) REFERENCES d42-api-pdc.locations (id);

The SQL above contains the transformations needed to add the assembly plant information to the vehicles table via a location FK in the vehicles table