-- Deploy gaia:2016_09_23_alter_table_statistic_device_add_column_idfv to mysql

BEGIN;

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

COMMIT;
