diff --git a/db_scripts/diff/15121.up b/db_scripts/diff/15121.up new file mode 100644 index 00000000..31916c71 --- /dev/null +++ b/db_scripts/diff/15121.up @@ -0,0 +1,19 @@ +USE provisioning; + +-- TODO: add foreign keys, but the will fail, right? +CREATE TABLE `voip_prof_preferences` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `profile_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 `profidattrid_idx` (`profile_id`,`attribute_id`), + KEY `profid_idx` (`profile_id`), + KEY `attrid_idx` (`attribute_id`) +) ENGINE=InnoDB; + +alter table voip_preferences add column prof_pref tinyint(1) not null default 0 after usr_pref; +alter table voip_preferences_enum add column prof_pref tinyint(1) DEFAULT '0' after usr_pref; +update voip_preferences_enum set prof_pref=1 where dom_pref=1; +update voip_preferences set prof_pref=1 where dom_pref=1;