|
|
|
@ -484,3 +484,26 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_DETAIL (
|
|
|
|
|
ON DELETE NO ACTION
|
|
|
|
|
ON UPDATE NO ACTION
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- POLICY AND DEVICE GROUP MAPPING --
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS DM_DEVICE_GROUP_POLICY (
|
|
|
|
|
ID INT NOT NULL AUTO_INCREMENT,
|
|
|
|
|
DEVICE_GROUP_ID INT NOT NULL,
|
|
|
|
|
POLICY_ID INT NOT NULL,
|
|
|
|
|
TENANT_ID INT NOT NULL,
|
|
|
|
|
PRIMARY KEY (ID),
|
|
|
|
|
CONSTRAINT FK_DM_DEVICE_GROUP_POLICY
|
|
|
|
|
FOREIGN KEY (DEVICE_GROUP_ID)
|
|
|
|
|
REFERENCES DM_GROUP (ID)
|
|
|
|
|
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)
|
|
|
|
|
ON DELETE NO ACTION
|
|
|
|
|
ON UPDATE NO ACTION
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
-- END OF POLICY AND DEVICE GROUP MAPPING --
|
|
|
|
|