9 lines
281 B
MySQL
9 lines
281 B
MySQL
|
ALTER TABLE vn.collection ADD IF NOT EXISTS sectorFk INT NULL;
|
||
|
ALTER TABLE vn.collection ADD IF NOT EXISTS wagons INT NULL;
|
||
|
|
||
|
ALTER TABLE vn.collection
|
||
|
ADD CONSTRAINT collectionSector_FK
|
||
|
FOREIGN KEY (sectorFk)
|
||
|
REFERENCES vn.sector(id)
|
||
|
ON DELETE SET NULL
|
||
|
ON UPDATE CASCADE;
|