MT#9177 Remove DB version with searated cisco sync fields

ipeshinskaya/9177
Irina Peshinskaya 12 years ago
parent a6e40411f0
commit 26bfba0d69

@ -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;

@ -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;
Loading…
Cancel
Save