diff --git a/src/main/resources/db/migration/2004020.sql b/src/main/resources/db/migration/2004020.sql index 468b0470a..945bdba2b 100644 --- a/src/main/resources/db/migration/2004020.sql +++ b/src/main/resources/db/migration/2004020.sql @@ -1,4 +1,5 @@ # 2.4.20 ALTER TABLE `Device` DROP COLUMN `androidId`; -ALTER TABLE `Device` CHANGE `deviceId` `androidId` VARCHAR(255); +ALTER TABLE `Device` CHANGE `deviceId` `androidId` VARCHAR(255) NOT NULL; +ALTER TABLE `Device` ADD CONSTRAINT `UK_c2646199whiqrkjbht7hwyr3v` UNIQUE (`androidId`);