TT#64011 - Script for creating LNP Carrier patterns table

* Creates table for storing LNP Carrier
	   patterns. Is related to ncos_lnp_list
	   table

Change-Id: I971e441c25325866250ae7973fecbdeb19a6c145
changes/36/32136/3
Flaviu Mates 6 years ago
parent 3ffc9051fa
commit 6b7772a024

@ -0,0 +1,7 @@
SET autocommit=0;
USE billing;
DROP TABLE IF EXISTS `ncos_lnp_pattern_list`;
COMMIT;

@ -0,0 +1,17 @@
SET autocommit=0;
USE billing;
CREATE TABLE `ncos_lnp_pattern_list` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`ncos_lnp_list_id` int(11) unsigned NOT NULL,
`pattern` varchar(255) NOT NULL,
`description` text DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `listpat_idx` (`ncos_lnp_list_id`,`pattern`),
CONSTRAINT `c_p_l_ncoslnplist_ref` FOREIGN KEY (`ncos_lnp_list_id`) REFERENCES `ncos_lnp_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB;
INSERT INTO `ncos_lnp_pattern_list` (ncos_lnp_list_id, pattern, description) (SELECT id, '.*', '' FROM ncos_lnp_list);
COMMIT;
Loading…
Cancel
Save