-- Deploy gaia:2019_09_03_modify_device_ip_black_name_field to mysql

BEGIN;

ALTER TABLE `hippo_deviceblacklist` DROP COLUMN `is_delete`;
ALTER TABLE `hippo_deviceblacklist` DROP INDEX `hippo_deviceblacklist_6asd16q8`;
ALTER TABLE `hippo_deviceblacklist` ADD UNIQUE INDEX device_pull_black_type (`device_id`, `pull_black_type`);

ALTER TABLE `hippo_ipblacklist` DROP COLUMN `is_delete`;
ALTER TABLE `hippo_ipblacklist` DROP INDEX `hippo_ipblacklist_gjd2sa31`;
ALTER TABLE `hippo_ipblacklist` ADD UNIQUE INDEX ip_pull_black_type (`ip`, `pull_black_type`);

COMMIT;
