diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mssql.sql b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mssql.sql index f812b1575d7..447a99f1426 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mssql.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mssql.sql @@ -305,7 +305,6 @@ CREATE TABLE DM_POLICY_COMPLIANCE_STATUS ( LAST_FAILED_TIME DATETIME2(0) NULL, ATTEMPTS INT NULL, PRIMARY KEY (ID), - CONSTRAINT DEVICE_ID_UNIQUE UNIQUE (DEVICE_ID ASC), CONSTRAINT FK_POLICY_COMPLIANCE_STATUS_POLICY FOREIGN KEY (POLICY_ID) REFERENCES DM_POLICY (ID) diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mysql.sql b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mysql.sql index cdb2d3c0194..e340450d4cf 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mysql.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mysql.sql @@ -297,7 +297,6 @@ CREATE TABLE IF NOT EXISTS DM_POLICY_COMPLIANCE_STATUS ( LAST_FAILED_TIME TIMESTAMP NULL, ATTEMPTS INT NULL, PRIMARY KEY (ID), - UNIQUE INDEX DEVICE_ID_UNIQUE (DEVICE_ID ASC), CONSTRAINT FK_POLICY_COMPLIANCE_STATUS_POLICY FOREIGN KEY (POLICY_ID) REFERENCES DM_POLICY (ID) diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/oracle.sql b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/oracle.sql index 2b33f64118e..229556c1104 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/oracle.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/oracle.sql @@ -486,7 +486,6 @@ CREATE TABLE DM_POLICY_COMPLIANCE_STATUS ( LAST_FAILED_TIME TIMESTAMP(0) NULL, ATTEMPTS NUMBER(10) NULL, CONSTRAINT PK_DM_POLICY_COMP_STATUS PRIMARY KEY (ID), - CONSTRAINT DEVICE_ID_UNIQUE UNIQUE (DEVICE_ID), CONSTRAINT FK_POLICY_COMP_STATUS_POLICY FOREIGN KEY (POLICY_ID) REFERENCES DM_POLICY (ID) diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/postgresql.sql b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/postgresql.sql index 1740e5d551b..7b14cbb5cb1 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/postgresql.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/postgresql.sql @@ -267,7 +267,6 @@ CREATE TABLE IF NOT EXISTS DM_POLICY_COMPLIANCE_STATUS ( ON DELETE NO ACTION ON UPDATE NO ACTION ); -CREATE UNIQUE INDEX DEVICE_ID_UNIQUE ON DM_POLICY_COMPLIANCE_STATUS (DEVICE_ID ASC); CREATE TABLE IF NOT EXISTS DM_POLICY_CHANGE_MGT ( ID BIGSERIAL NOT NULL PRIMARY KEY,