salix/db/versions/.archive/10135-brownMonstera/00-firstScript.sql

13 lines
582 B
MySQL
Raw Permalink Normal View History

Use `vn`;
CREATE TABLE `vn`.`zoneExclusionGeo` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`zoneExclusionFk` int(11) NOT NULL,
`geoFk` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `zoneExclusionGeo_UN` (`zoneExclusionFk`,`geoFk`),
KEY `zoneExclusionGeo2_FK_1` (`geoFk`),
CONSTRAINT `zoneExclusionGeo_FK` FOREIGN KEY (`geoFk`) REFERENCES `zoneGeo` (`id`) ON UPDATE CASCADE,
CONSTRAINT `zoneExclusionGeo_FK_1` FOREIGN KEY (`zoneExclusionFk`) REFERENCES `zoneExclusion` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;