-- Deploy gaia:2016_09_23_alter_table_statistic_device_doctor_add_column_idfv to mysql

BEGIN;

ALTER TABLE `statistic_device_doctor` ADD COLUMN `idfv` VARCHAR(100)  NOT NULL DEFAULT "";
ALTER TABLE `statistic_device_doctor` DROP INDEX `device_id`;
ALTER TABLE `statistic_device_doctor` ADD CONSTRAINT  `unique_device` UNIQUE (`platform`, `device_id`, `idfv`);

COMMIT;
