From 26bfba0d696cea1ddfd7a4d5f2fe51bcd983c9aa Mon Sep 17 00:00:00 2001 From: Irina Peshinskaya Date: Fri, 31 Oct 2014 09:56:41 +0200 Subject: [PATCH] MT#9177 Remove DB version with searated cisco sync fields --- db_scripts/diff/99998.down | 17 ----------------- db_scripts/diff/99998.up | 25 ------------------------- 2 files changed, 42 deletions(-) delete mode 100644 db_scripts/diff/99998.down delete mode 100644 db_scripts/diff/99998.up diff --git a/db_scripts/diff/99998.down b/db_scripts/diff/99998.down deleted file mode 100644 index 3d35cdce..00000000 --- a/db_scripts/diff/99998.down +++ /dev/null @@ -1,17 +0,0 @@ -use provisioning; - -alter table autoprov_devices -add column `sync_uri` varchar(255) DEFAULT NULL, -add column `sync_method` enum('GET','POST') DEFAULT 'GET', -add column `sync_params` varchar(255) DEFAULT NULL, -add column `security_handler` varchar(255) DEFAULT NULL, -drop column `bootstrap_method`; - -update autoprov_devices d - inner join autoprov_sync_cisco sc on d.id=sc.device_id -set d.sync_uri= sc.sync_uri, - d.sync_method= sc.sync_method, - d.sync_params= sc.sync_params, - d.security_handler=sc.security_handler; - -drop table autoprov_sync_cisco; diff --git a/db_scripts/diff/99998.up b/db_scripts/diff/99998.up deleted file mode 100644 index 6d56069a..00000000 --- a/db_scripts/diff/99998.up +++ /dev/null @@ -1,25 +0,0 @@ -use provisioning; - -alter table autoprov_devices -add column bootstrap_method enum('http','redirect_panasonic','redirect_linksys') not null default 'http'; - -update autoprov_devices set bootstrap_method='http' where vendor='Cisco'; - -create table autoprov_sync_cisco( - `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, - `security_handler` varchar(255) DEFAULT NULL, - CONSTRAINT `a_s_deviceid_ref` FOREIGN KEY (`device_id`) REFERENCES `autoprov_devices` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -); - -insert into autoprov_sync_cisco(device_id,sync_uri,sync_method,sync_params) -select d.id,d.sync_uri,d.sync_method,d.sync_params from autoprov_devices d where d.bootstrap_method='http'; - - -alter table autoprov_devices -drop column sync_uri, -drop column sync_method, -drop column sync_params, -drop column security_handler;