12 lines
565 B
MySQL
12 lines
565 B
MySQL
|
-- Place your SQL code here
|
||
|
USE vn;
|
||
|
CREATE TABLE vn.`routeDefaultAgencyMode` (
|
||
|
`id` int(11) NOT NULL DEFAULT 0,
|
||
|
`workcenterFk` int(11) UNIQUE DEFAULT NULL,
|
||
|
`agencyModeFk` int(11) DEFAULT NULL,
|
||
|
PRIMARY KEY (`id`)
|
||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
|
||
|
|
||
|
ALTER TABLE vn.routeDefaultAgencyMode ADD CONSTRAINT routeDefaultAgencyMode_FK FOREIGN KEY (agencyModeFk) REFERENCES vn.`agencyMode`(id);
|
||
|
ALTER TABLE vn.routeDefaultAgencyMode ADD CONSTRAINT routeDefaultAgencyMode_FK_1 FOREIGN KEY (workcenterFk) REFERENCES vn.workCenter(id);
|