From d030a61d5b9625c23f7e68e1a351bb306b850d57 Mon Sep 17 00:00:00 2001 From: Andreas Granig Date: Tue, 18 Nov 2014 15:53:30 +0100 Subject: [PATCH] MT#10199 Add subscriber profile preferences. Change-Id: I165faf42ec5d48f8df8d685b9a727585765ed0b8 --- db_scripts/diff/15121.up | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 db_scripts/diff/15121.up 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;