From 3cac4cb07d8181485c3389f589f64f475eed9a87 Mon Sep 17 00:00:00 2001 From: Irina Peshinskaya Date: Sat, 25 Oct 2014 07:48:20 +0300 Subject: [PATCH] MT#9177 Add potentially yealink. Add storage for credentials. --- db_scripts/diff/99997.down | 2 ++ db_scripts/diff/99997.up | 10 ++++++++++ db_scripts/diff/99998.up | 2 +- db_scripts/diff/99999.up | 4 ++-- 4 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 db_scripts/diff/99997.down create mode 100644 db_scripts/diff/99997.up diff --git a/db_scripts/diff/99997.down b/db_scripts/diff/99997.down new file mode 100644 index 00000000..e648b615 --- /dev/null +++ b/db_scripts/diff/99997.down @@ -0,0 +1,2 @@ +use billing; +drop table contract_vendor_credentials; \ No newline at end of file diff --git a/db_scripts/diff/99997.up b/db_scripts/diff/99997.up new file mode 100644 index 00000000..b0e2404b --- /dev/null +++ b/db_scripts/diff/99997.up @@ -0,0 +1,10 @@ +use billing; + +create table contract_vendor_credentials( + id int(11) unsigned not null primary key auto_increment, + contract_id int(11) unsigned not null, + vendor enum('panasonic','linksys','yealink'), + user varchar(255), + password varchar(255), + CONSTRAINT `c_v_c_contractid_ref` FOREIGN KEY (`contract_id`) REFERENCES `contracts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +); diff --git a/db_scripts/diff/99998.up b/db_scripts/diff/99998.up index 5491fa8b..6d56069a 100644 --- a/db_scripts/diff/99998.up +++ b/db_scripts/diff/99998.up @@ -6,7 +6,7 @@ add column bootstrap_method enum('http','redirect_panasonic','redirect_linksys') update autoprov_devices set bootstrap_method='http' where vendor='Cisco'; create table autoprov_sync_cisco( - `device_id` integer unsigned not null, + `device_id` int(11) unsigned not null, `sync_uri` varchar(255) DEFAULT NULL, `sync_method` enum('GET','POST') DEFAULT 'GET', `sync_params` varchar(255) DEFAULT NULL, diff --git a/db_scripts/diff/99999.up b/db_scripts/diff/99999.up index 6f5c5896..0fc3a427 100644 --- a/db_scripts/diff/99999.up +++ b/db_scripts/diff/99999.up @@ -1,13 +1,13 @@ use provisioning; alter table autoprov_devices -add column bootstrap_method enum('http','zte_panasonic','zte_linksys') not null default 'http'; +add column bootstrap_method enum('http','redirect_panasonic','redirect_linksys','redirect_yealink') not null default 'http'; update autoprov_devices set bootstrap_method='http' where vendor='Cisco'; create table autoprov_sync_parameters( `id` integer unsigned not null auto_increment primary key, - `bootstrap_method` enum('http','zte_panasonic','zte_linksys') not null default 'http', + `bootstrap_method` enum('http','redirect_panasonic','redirect_linksys','redirect_yealink') not null default 'http', `parameter_name` enum('sync_uri','sync_method','sync_params','security_handler'), `parameter_constraint` varchar(255), UNIQUE KEY sync_parameter (bootstrap_method,parameter_name)