UPDATE `omc_db`.`alarm`
SET event_time = STR_TO_DATE(SUBSTRING_INDEX(CONVERT_TZ(SUBSTRING_INDEX(event_time, '+', 1), '+08:00', CONCAT('+', SUBSTRING_INDEX(event_time, '+', -1))), '.', 1), '%Y-%m-%d %H:%i:%s');
ALTER TABLE `omc_db`.`alarm` 
MODIFY COLUMN `event_time` datetime NULL DEFAULT NULL AFTER `alarm_code`;
ALTER TABLE `omc_db`.`alarm` 
MODIFY COLUMN `orig_severity` enum('Critical','Major','Minor','Warning','Event') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'Minor' COMMENT '1: Critical, 2: Major, 3: Minor, 4: Warning, 5: Event(Only VNF)' AFTER `alarm_type`,
ADD COLUMN `perceived_severity` enum('Critical','Major','Minor','Warning','Event') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '1: Critical, 2: Major, 3: Minor, 4: Warning, 5: Event(Only VNF)' AFTER `orig_severity`,
ADD COLUMN `clear_user` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL AFTER `clear_time`,
DROP INDEX `idx_uni_aid_ne_aseq`,
ADD UNIQUE INDEX `idx_uni_aid_ne_aseq`(`ne_type`, `ne_id`, `alarm_id`, `alarm_seq`) USING BTREE,
ADD INDEX `idx_event_time`(`event_time`) USING BTREE;
