|
|
|
@ -5,6 +5,7 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_TYPE (
|
|
|
|
|
SHARED_WITH_ALL_TENANTS BOOLEAN NOT NULL DEFAULT FALSE,
|
|
|
|
|
PRIMARY KEY (ID)
|
|
|
|
|
)ENGINE = InnoDB;
|
|
|
|
|
CREATE INDEX device_type_name ON DM_DEVICE_TYPE (NAME);
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS DM_DEVICE (
|
|
|
|
|
ID INTEGER AUTO_INCREMENT NOT NULL,
|
|
|
|
@ -117,13 +118,13 @@ CREATE TABLE IF NOT EXISTS DM_PROFILE (
|
|
|
|
|
ID INT NOT NULL AUTO_INCREMENT ,
|
|
|
|
|
PROFILE_NAME VARCHAR(45) NOT NULL ,
|
|
|
|
|
TENANT_ID INT NOT NULL ,
|
|
|
|
|
DEVICE_TYPE_ID INT NOT NULL ,
|
|
|
|
|
DEVICE_TYPE VARCHAR(300) NOT NULL ,
|
|
|
|
|
CREATED_TIME DATETIME NOT NULL ,
|
|
|
|
|
UPDATED_TIME DATETIME NOT NULL ,
|
|
|
|
|
PRIMARY KEY (ID) ,
|
|
|
|
|
CONSTRAINT DM_PROFILE_DEVICE_TYPE
|
|
|
|
|
FOREIGN KEY (DEVICE_TYPE_ID )
|
|
|
|
|
REFERENCES DM_DEVICE_TYPE (ID )
|
|
|
|
|
FOREIGN KEY (DEVICE_TYPE)
|
|
|
|
|
REFERENCES DM_DEVICE_TYPE (NAME)
|
|
|
|
|
ON DELETE NO ACTION
|
|
|
|
|
ON UPDATE NO ACTION
|
|
|
|
|
)ENGINE = InnoDB;
|
|
|
|
@ -171,7 +172,7 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_POLICY (
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS DM_DEVICE_TYPE_POLICY (
|
|
|
|
|
ID INT(11) NOT NULL ,
|
|
|
|
|
DEVICE_TYPE_ID INT(11) NOT NULL ,
|
|
|
|
|
DEVICE_TYPE VARCHAR(300) NOT NULL ,
|
|
|
|
|
POLICY_ID INT(11) NOT NULL ,
|
|
|
|
|
PRIMARY KEY (ID) ,
|
|
|
|
|
CONSTRAINT FK_DEVICE_TYPE_POLICY
|
|
|
|
@ -180,8 +181,8 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_TYPE_POLICY (
|
|
|
|
|
ON DELETE NO ACTION
|
|
|
|
|
ON UPDATE NO ACTION,
|
|
|
|
|
CONSTRAINT FK_DEVICE_TYPE_POLICY_DEVICE_TYPE
|
|
|
|
|
FOREIGN KEY (DEVICE_TYPE_ID )
|
|
|
|
|
REFERENCES DM_DEVICE_TYPE (ID )
|
|
|
|
|
FOREIGN KEY (DEVICE_TYPE )
|
|
|
|
|
REFERENCES DM_DEVICE_TYPE (NAME )
|
|
|
|
|
ON DELETE NO ACTION
|
|
|
|
|
ON UPDATE NO ACTION
|
|
|
|
|
)ENGINE = InnoDB;
|
|
|
|
@ -191,7 +192,7 @@ CREATE TABLE IF NOT EXISTS DM_PROFILE_FEATURES (
|
|
|
|
|
ID INT(11) NOT NULL AUTO_INCREMENT,
|
|
|
|
|
PROFILE_ID INT(11) NOT NULL,
|
|
|
|
|
FEATURE_CODE VARCHAR(100) NOT NULL,
|
|
|
|
|
DEVICE_TYPE_ID INT NOT NULL,
|
|
|
|
|
DEVICE_TYPE VARCHAR(300) NOT NULL ,
|
|
|
|
|
TENANT_ID INT(11) NOT NULL ,
|
|
|
|
|
CONTENT BLOB NULL DEFAULT NULL,
|
|
|
|
|
PRIMARY KEY (ID),
|
|
|
|
@ -308,7 +309,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 VARCHAR(300) NOT NULL ,
|
|
|
|
|
TENANT_ID INT(11) NOT NULL,
|
|
|
|
|
PRIMARY KEY (ID)
|
|
|
|
|
)ENGINE = InnoDB;
|
|
|
|
|