modified dbscripts to remove foriegn key reference

4.x.x
pasinduj 9 years ago
parent b3e2c856a9
commit a390df68ec

@ -1282,11 +1282,11 @@ public class PolicyDAOImpl implements PolicyDAO {
stmt.setInt(1, policyId); stmt.setInt(1, policyId);
stmt.executeUpdate(); stmt.executeUpdate();
String deleteComplianceStatus ="DELETE FROM DM_POLICY_COMPLIANCE_STATUS WHERE POLICY_ID =?"; /* String deleteComplianceStatus ="DELETE FROM DM_POLICY_COMPLIANCE_STATUS WHERE POLICY_ID =?";
stmt = conn.prepareStatement(deleteComplianceStatus); stmt = conn.prepareStatement(deleteComplianceStatus);
stmt.setInt(1, policyId); stmt.setInt(1, policyId);
stmt.executeUpdate(); stmt.executeUpdate();
*/
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {
log.debug("Policy (" + policyId + ") related configs deleted from database."); log.debug("Policy (" + policyId + ") related configs deleted from database.");
} }

@ -309,9 +309,9 @@ CREATE TABLE IF NOT EXISTS DM_POLICY_COMPLIANCE_STATUS (
LAST_FAILED_TIME TIMESTAMP NULL, LAST_FAILED_TIME TIMESTAMP NULL,
ATTEMPTS INT NULL, ATTEMPTS INT NULL,
PRIMARY KEY (ID), PRIMARY KEY (ID),
CONSTRAINT FK_POLICY_COMPLIANCE_STATUS_POLICY /*CONSTRAINT FK_POLICY_COMPLIANCE_STATUS_POLICY
FOREIGN KEY (POLICY_ID) FOREIGN KEY (POLICY_ID)
REFERENCES DM_POLICY (ID) REFERENCES DM_POLICY (ID)*/
ON DELETE NO ACTION ON DELETE NO ACTION
ON UPDATE NO ACTION ON UPDATE NO ACTION
); );

@ -297,9 +297,9 @@ CREATE TABLE IF NOT EXISTS DM_POLICY_COMPLIANCE_STATUS (
LAST_FAILED_TIME TIMESTAMP NULL, LAST_FAILED_TIME TIMESTAMP NULL,
ATTEMPTS INT NULL, ATTEMPTS INT NULL,
PRIMARY KEY (ID), PRIMARY KEY (ID),
CONSTRAINT FK_POLICY_COMPLIANCE_STATUS_POLICY /* CONSTRAINT FK_POLICY_COMPLIANCE_STATUS_POLICY
FOREIGN KEY (POLICY_ID) FOREIGN KEY (POLICY_ID)
REFERENCES DM_POLICY (ID) REFERENCES DM_POLICY (ID)*/
ON DELETE NO ACTION ON DELETE NO ACTION
ON UPDATE NO ACTION ON UPDATE NO ACTION
)ENGINE = InnoDB; )ENGINE = InnoDB;

Loading…
Cancel
Save