You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
db-schema/db_scripts/diff/15055.up

25 lines
943 B

USE provisioning;
CREATE TABLE `voip_subscriber_profiles` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`reseller_id` int(11) unsigned NOT NULL,
`name` varchar(255) NOT NULL,
`description` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `vsp_resname_idx` (`reseller_id`,`name`)
) ENGINE=InnoDB;
CREATE TABLE `voip_subscriber_profile_attributes` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`profile_id` int(11) unsigned NOT NULL,
`attribute_id` int(11) unsigned NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `prof_attr_idx` (`profile_id`,`attribute_id`),
KEY `attribute_id` (`attribute_id`),
KEY `profile_idx` (`profile_id`),
CONSTRAINT `voip_subscriber_profile_attributes_ibfk_1` FOREIGN KEY (`attribute_id`) REFERENCES `voip_preferences` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB;
ALTER TABLE voip_subscribers
ADD COLUMN profile_id INT(11) UNSIGNED DEFAULT NULL AFTER pbx_group_id;