mirror of https://github.com/sipwise/db-schema.git
Change-Id: Ic952c2472293ea665827fa0713b494e77e9c5dfechanges/11/7811/3
parent
b830d52ae2
commit
65c420fc1b
@ -0,0 +1,10 @@
|
|||||||
|
SET AUTOCOMMIT=0;
|
||||||
|
|
||||||
|
USE provisioning;
|
||||||
|
|
||||||
|
DROP TABLE `voip_dev_preferences`;
|
||||||
|
|
||||||
|
alter table voip_preferences drop column `dev_pref`;
|
||||||
|
alter table voip_preferences_enum drop column `dev_pref`;
|
||||||
|
|
||||||
|
COMMIT;
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
SET AUTOCOMMIT=0;
|
||||||
|
|
||||||
|
USE provisioning;
|
||||||
|
|
||||||
|
CREATE TABLE `voip_dev_preferences` (
|
||||||
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`device_id` int(11) unsigned NOT NULL,
|
||||||
|
`attribute_id` int(11) unsigned NOT NULL,
|
||||||
|
`value` varchar(128) NOT NULL,
|
||||||
|
`modify_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `devidattrid_idx` (`device_id`,`attribute_id`),
|
||||||
|
KEY `deviceid_idx` (`device_id`),
|
||||||
|
KEY `attributeid_idx` (`attribute_id`),
|
||||||
|
CONSTRAINT `v_dev_p_attributeid_ref` FOREIGN KEY (`attribute_id`) REFERENCES `voip_preferences` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
|
CONSTRAINT `v_d_p_deviceid_ref` FOREIGN KEY (`device_id`) REFERENCES `autoprov_devices` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
|
||||||
|
|
||||||
|
alter table voip_preferences add column `dev_pref` tinyint(1) NOT NULL DEFAULT '0' after `contract_location_pref`;
|
||||||
|
alter table voip_preferences_enum add column `dev_pref` tinyint(1) NOT NULL DEFAULT '0' after `contract_location_pref`;
|
||||||
|
|
||||||
|
COMMIT;
|
||||||
Loading…
Reference in new issue