Fixing SQL errors

4.x.x
Kasun Delgolla 9 years ago
parent a23e578537
commit 4cb7b86f4c

@ -502,8 +502,8 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_GROUP_POLICY (
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT FK_DM_DEVICE_GROUP_DM_POLICY
FOREIGN KEY (POLICY_ID , DEVICE_GROUP_ID)
REFERENCES DM_POLICY (ID , ID)
FOREIGN KEY (POLICY_ID)
REFERENCES DM_POLICY (ID)
ON DELETE NO ACTION
ON UPDATE NO ACTION
);

@ -353,8 +353,8 @@ CREATE TABLE DM_DEVICE_GROUP_POLICY (
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT FK_DM_DEVICE_GROUP_DM_POLICY
FOREIGN KEY (POLICY_ID , DEVICE_GROUP_ID)
REFERENCES DM_POLICY (ID , ID)
FOREIGN KEY (POLICY_ID)
REFERENCES DM_POLICY (ID)
ON DELETE NO ACTION
ON UPDATE NO ACTION
);

@ -423,8 +423,8 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_GROUP_POLICY (
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT FK_DM_DEVICE_GROUP_DM_POLICY
FOREIGN KEY (POLICY_ID , DEVICE_GROUP_ID)
REFERENCES DM_POLICY (ID , ID)
FOREIGN KEY (POLICY_ID)
REFERENCES DM_POLICY (ID)
ON DELETE NO ACTION
ON UPDATE NO ACTION
)ENGINE = InnoDB;

@ -580,8 +580,8 @@ CREATE TABLE DM_DEVICE_GROUP_POLICY (
REFERENCES DM_GROUP (ID)
,
CONSTRAINT FK_DM_DEVICE_GROUP_DM_POLICY
FOREIGN KEY (POLICY_ID , DEVICE_GROUP_ID)
REFERENCES DM_POLICY (ID , ID)
FOREIGN KEY (POLICY_ID)
REFERENCES DM_POLICY (ID)
) ;
-- Generate ID using sequence and trigger

@ -306,8 +306,8 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_GROUP_POLICY (
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT FK_DM_DEVICE_GROUP_DM_POLICY
FOREIGN KEY (POLICY_ID , DEVICE_GROUP_ID)
REFERENCES DM_POLICY (ID , ID)
FOREIGN KEY (POLICY_ID)
REFERENCES DM_POLICY (ID)
ON DELETE NO ACTION
ON UPDATE NO ACTION
);

Loading…
Cancel
Save