From f49f13501ff44592859def412510a622a9078162 Mon Sep 17 00:00:00 2001 From: pasinduj Date: Tue, 8 Dec 2015 15:35:01 +0530 Subject: [PATCH] modified dbscripts removing policy ID forigen key from one table --- .../wso2/carbon/policy/mgt/core/dao/impl/PolicyDAOImpl.java | 5 ----- .../src/main/resources/dbscripts/cdm/mysql.sql | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/dao/impl/PolicyDAOImpl.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/dao/impl/PolicyDAOImpl.java index cd886a4368..7fd9d04d75 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/dao/impl/PolicyDAOImpl.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/dao/impl/PolicyDAOImpl.java @@ -1282,11 +1282,6 @@ public class PolicyDAOImpl implements PolicyDAO { stmt.setInt(1, policyId); stmt.executeUpdate(); - /* String deleteComplianceStatus ="DELETE FROM DM_POLICY_COMPLIANCE_STATUS WHERE POLICY_ID =?"; - stmt = conn.prepareStatement(deleteComplianceStatus); - stmt.setInt(1, policyId); - stmt.executeUpdate(); - */ if (log.isDebugEnabled()) { log.debug("Policy (" + policyId + ") related configs deleted from database."); } 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 6a9d8eee71..3433d77867 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 @@ -303,7 +303,7 @@ CREATE TABLE IF NOT EXISTS DM_POLICY_COMPLIANCE_STATUS ( CREATE TABLE IF NOT EXISTS DM_POLICY_CHANGE_MGT ( ID INT NOT NULL AUTO_INCREMENT, POLICY_ID INT NOT NULL, - DEVICE_TYPE_ID INT NOT NULL, + DEVICE_TYPE_ID INT NOT NULL TENANT_ID INT(11) NOT NULL, PRIMARY KEY (ID) )ENGINE = InnoDB;