mirror of https://github.com/sipwise/db-schema.git
Change-Id: Ic592d51b6dc7d98c8d5e52e360aa7cce4c927b54changes/04/7804/1
parent
9e197028ca
commit
3413f4753b
@ -0,0 +1,12 @@
|
|||||||
|
USE provisioning;
|
||||||
|
|
||||||
|
SET autocommit=0;
|
||||||
|
|
||||||
|
ALTER TABLE `provisioning`.`voip_cf_mappings`
|
||||||
|
DROP COLUMN `source_set_id`;
|
||||||
|
|
||||||
|
DROP TABLE `voip_cf_sources`;
|
||||||
|
|
||||||
|
DROP TABLE `voip_cf_source_sets`;
|
||||||
|
|
||||||
|
COMMIT;
|
||||||
@ -0,0 +1,28 @@
|
|||||||
|
USE provisioning;
|
||||||
|
|
||||||
|
SET autocommit=0;
|
||||||
|
|
||||||
|
CREATE TABLE `voip_cf_source_sets` (
|
||||||
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`subscriber_id` int(11) unsigned DEFAULT NULL,
|
||||||
|
`name` varchar(255) NOT NULL,
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `sub_idx` (`subscriber_id`),
|
||||||
|
KEY `name_idx` (`name`),
|
||||||
|
CONSTRAINT `vcss_subid_ref` FOREIGN KEY (`subscriber_id`) REFERENCES `voip_subscribers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
CREATE TABLE `voip_cf_sources` (
|
||||||
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`source_set_id` int(11) unsigned NOT NULL,
|
||||||
|
`source` varchar(255) NOT NULL,
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `sset_idx` (`source_set_id`),
|
||||||
|
KEY `source_idx` (`source`),
|
||||||
|
CONSTRAINT `v_cf_ssetid_ref` FOREIGN KEY (`source_set_id`) REFERENCES `voip_cf_source_sets` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
ALTER TABLE `provisioning`.`voip_cf_mappings`
|
||||||
|
ADD COLUMN `source_set_id` INT(11) UNSIGNED NULL DEFAULT NULL AFTER `time_set_id`;
|
||||||
|
|
||||||
|
COMMIT;
|
||||||
Loading…
Reference in new issue