ALTER TABLE  `ports-state` DROP  `ifInUcastPkts_delta` ,DROP  `ifOutUcastPkts_delta` ,DROP  `ifInErrors_delta` ,DROP  `ifOutErrors_delta` ,DROP  `ifInOctets_delta` ,DROP  `ifOutOctets_delta` ;
ALTER TABLE  `ports` DROP  `pagpOperationMode` ,DROP  `pagpPortState` ,DROP  `pagpPartnerDeviceId` ,DROP  `pagpPartnerLearnMethod` ,DROP  `pagpPartnerIfIndex` ,DROP  `pagpPartnerGroupIfIndex` ,DROP  `pagpPartnerDeviceName` ,DROP  `pagpEthcOperationMode` ,DROP  `pagpDeviceId` ,DROP  `pagpGroupIfIndex` ;
ALTER TABLE `ports` ADD `ifInUcastPkts` bigint(20) unsigned NOT NULL,ADD `ifInUcastPkts_rate` int(11) unsigned NOT NULL,ADD `ifOutUcastPkts` bigint(20) unsigned NOT NULL,ADD `ifOutUcastPkts_rate` int(11) unsigned NOT NULL,ADD `ifInErrors` bigint(20) unsigned NOT NULL,ADD `ifInErrors_rate` smallint(5) unsigned NOT NULL,ADD `ifOutErrors` bigint(20) unsigned NOT NULL,ADD `ifOutErrors_rate` smallint(5) unsigned NOT NULL,ADD `ifOctets_rate` bigint(20) unsigned NOT NULL,ADD `ifUcastPkts_rate` int(11) unsigned NOT NULL,ADD `ifErrors_rate` smallint(5) unsigned NOT NULL,ADD `ifInOctets` bigint(20) unsigned NOT NULL,ADD `ifInOctets_rate` bigint(20) unsigned NOT NULL,ADD `ifOutOctets` bigint(20) unsigned NOT NULL,ADD `ifOutOctets_rate` bigint(20) unsigned NOT NULL,ADD `ifInOctets_perc` tinyint(3) unsigned NOT NULL,ADD `ifOutOctets_perc` tinyint(3) unsigned NOT NULL,ADD `poll_time` int(11) unsigned NOT NULL,ADD `poll_period` int(11) unsigned NOT NULL;
UPDATE `ports` p, `ports-state` s SET p.`ifInUcastPkts` = s.`ifInUcastPkts`, p.`ifInUcastPkts_rate` = s.`ifInUcastPkts_rate`, p.`ifOutUcastPkts` = s.`ifOutUcastPkts`, p.`ifOutUcastPkts_rate` = s.`ifOutUcastPkts_rate`, p.`ifInErrors` = s.`ifInErrors`, p.`ifInErrors_rate` = s.`ifInErrors_rate`, p.`ifOutErrors` = s.`ifOutErrors`, p.`ifOutErrors_rate` = s.`ifOutErrors_rate`, p.`ifOctets_rate` = s.`ifOctets_rate`, p.`ifUcastPkts_rate` = s.`ifUcastPkts_rate`, p.`ifErrors_rate` = s.`ifErrors_rate`, p.`ifInOctets` = s.`ifInOctets`, p.`ifInOctets_rate` = s.`ifInOctets_rate`, p.`ifOutOctets` = s.`ifOutOctets`, p.`ifOutOctets_rate` = s.`ifOutOctets_rate`, p.`ifInOctets_perc` = s.`ifInOctets_perc`, p.`ifOutOctets_perc` = s.`ifOutOctets_perc`, p.`poll_time` = s.`poll_time`, p.`poll_period` = s.`poll_period` WHERE p.port_id = s.port_id;
