mirror of https://github.com/sipwise/db-schema.git
* Creates table for storing LNP Carrier patterns. Is related to ncos_lnp_list table Change-Id: I971e441c25325866250ae7973fecbdeb19a6c145changes/36/32136/3
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…
Reference in new issue