ALTER TABLE `ospf_instances` CHANGE `ospfRouterId` `ospfRouterId` VARCHAR(32) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL, CHANGE `ospfAdminStat` `ospfAdminStat` ENUM('enabled','disabled') CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT 'disabled', CHANGE `ospfVersionNumber` `ospfVersionNumber` ENUM('version2','version3') CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL;
ALTER TABLE `ospf_instances` CHANGE `ospfAreaBdrRtrStatus` `ospfAreaBdrRtrStatus` ENUM('true','false') CHARACTER SET latin1 COLLATE latin1_general_ci NULL DEFAULT NULL, CHANGE `ospfASBdrRtrStatus` `ospfASBdrRtrStatus` ENUM('true','false') CHARACTER SET latin1 COLLATE latin1_general_ci NULL DEFAULT NULL, CHANGE `ospfTOSSupport` `ospfTOSSupport` ENUM('true','false') CHARACTER SET latin1 COLLATE latin1_general_ci NULL DEFAULT NULL, CHANGE `ospfDemandExtensions` `ospfDemandExtensions` ENUM('true','false') CHARACTER SET latin1 COLLATE latin1_general_ci NULL DEFAULT NULL;
ALTER TABLE `ospf_instances` DROP INDEX `device_id`;
ALTER TABLE `ospf_instances` ADD UNIQUE `device` (`device_id`, `ospfVersionNumber`);
ALTER TABLE `ospf_areas` CHANGE `ospfAreaId` `ospfAreaId` VARCHAR(32) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL, CHANGE `ospfAuthType` `ospfAuthType` VARCHAR(64) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL, CHANGE `ospfImportAsExtern` `ospfImportAsExtern` VARCHAR(128) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL, CHANGE `ospfAreaSummary` `ospfAreaSummary` VARCHAR(16) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL, CHANGE `ospfAreaStatus` `ospfAreaStatus` VARCHAR(16) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL;
ALTER TABLE `ospf_areas` CHANGE `ospfAuthType` `ospfAuthType` VARCHAR(64) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT 'none';
ALTER TABLE `ospf_areas` ADD `ospfVersionNumber` ENUM('version2','version3') CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT 'version2' AFTER `device_id`;
ALTER TABLE `ospf_areas` DROP INDEX `device_area`;
ALTER TABLE `ospf_areas` ADD UNIQUE `device_area` (`device_id`, `ospfVersionNumber`, `ospfAreaId`);
ALTER TABLE `ospf_ports` CHANGE `ospf_port_id` `ospf_port_id` VARCHAR(32) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL, CHANGE `ospfIfIpAddress` `ospfIfIpAddress` VARCHAR(128) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL, CHANGE `ospfIfAreaId` `ospfIfAreaId` VARCHAR(32) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL, CHANGE `ospfIfType` `ospfIfType` VARCHAR(32) CHARACTER SET latin1 COLLATE latin1_general_ci NULL DEFAULT NULL, CHANGE `ospfIfAdminStat` `ospfIfAdminStat` VARCHAR(32) CHARACTER SET latin1 COLLATE latin1_general_ci NULL DEFAULT NULL, CHANGE `ospfIfState` `ospfIfState` VARCHAR(32) CHARACTER SET latin1 COLLATE latin1_general_ci NULL DEFAULT NULL, CHANGE `ospfIfDesignatedRouter` `ospfIfDesignatedRouter` VARCHAR(32) CHARACTER SET latin1 COLLATE latin1_general_ci NULL DEFAULT NULL, CHANGE `ospfIfBackupDesignatedRouter` `ospfIfBackupDesignatedRouter` VARCHAR(32) CHARACTER SET latin1 COLLATE latin1_general_ci NULL DEFAULT NULL, CHANGE `ospfIfAuthKey` `ospfIfAuthKey` VARCHAR(128) CHARACTER SET latin1 COLLATE latin1_general_ci NULL DEFAULT NULL, CHANGE `ospfIfStatus` `ospfIfStatus` VARCHAR(32) CHARACTER SET latin1 COLLATE latin1_general_ci NULL DEFAULT NULL, CHANGE `ospfIfMulticastForwarding` `ospfIfMulticastForwarding` VARCHAR(32) CHARACTER SET latin1 COLLATE latin1_general_ci NULL DEFAULT NULL, CHANGE `ospfIfDemand` `ospfIfDemand` VARCHAR(32) CHARACTER SET latin1 COLLATE latin1_general_ci NULL DEFAULT NULL, CHANGE `ospfIfAuthType` `ospfIfAuthType` VARCHAR(32) CHARACTER SET latin1 COLLATE latin1_general_ci NULL DEFAULT NULL;
ALTER TABLE `ospf_nbrs` CHANGE `ospf_nbr_id` `ospf_nbr_id` VARCHAR(32) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL, CHANGE `ospfNbrIpAddr` `ospfNbrIpAddr` VARCHAR(128) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL, CHANGE `ospfNbrRtrId` `ospfNbrRtrId` VARCHAR(32) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL, CHANGE `ospfNbrState` `ospfNbrState` VARCHAR(32) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL, CHANGE `ospfNbmaNbrStatus` `ospfNbmaNbrStatus` VARCHAR(32) CHARACTER SET latin1 COLLATE latin1_general_ci NULL DEFAULT NULL, CHANGE `ospfNbmaNbrPermanence` `ospfNbmaNbrPermanence` VARCHAR(32) CHARACTER SET latin1 COLLATE latin1_general_ci NULL DEFAULT NULL, CHANGE `ospfNbrHelloSuppressed` `ospfNbrHelloSuppressed` VARCHAR(32) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL;
