|
|
@ -295,33 +295,6 @@ CREATE TABLE IF NOT EXISTS DM_POLICY_CRITERIA_PROPERTIES (
|
|
|
|
ON UPDATE NO ACTION
|
|
|
|
ON UPDATE NO ACTION
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS DM_APPLICATION (
|
|
|
|
|
|
|
|
ID INTEGER AUTO_INCREMENT NOT NULL,
|
|
|
|
|
|
|
|
NAME VARCHAR(50) NOT NULL,
|
|
|
|
|
|
|
|
APP_IDENTIFIER VARCHAR(50) NOT NULL,
|
|
|
|
|
|
|
|
PLATFORM VARCHAR(50) NULL DEFAULT NULL,
|
|
|
|
|
|
|
|
CATEGORY VARCHAR(50) NULL,
|
|
|
|
|
|
|
|
VERSION VARCHAR(50) NULL,
|
|
|
|
|
|
|
|
TYPE VARCHAR(50) NULL,
|
|
|
|
|
|
|
|
LOCATION_URL VARCHAR(100) NULL DEFAULT NULL,
|
|
|
|
|
|
|
|
IMAGE_URL VARCHAR(100) NULL DEFAULT NULL,
|
|
|
|
|
|
|
|
APP_PROPERTIES BLOB NULL,
|
|
|
|
|
|
|
|
TENANT_ID INTEGER NOT NULL,
|
|
|
|
|
|
|
|
PRIMARY KEY (ID)
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS DM_DEVICE_APPLICATION_MAPPING (
|
|
|
|
|
|
|
|
ID INTEGER AUTO_INCREMENT NOT NULL,
|
|
|
|
|
|
|
|
DEVICE_ID INTEGER NOT NULL,
|
|
|
|
|
|
|
|
APPLICATION_ID INTEGER NOT NULL,
|
|
|
|
|
|
|
|
TENANT_ID INTEGER NOT NULL,
|
|
|
|
|
|
|
|
PRIMARY KEY (ID),
|
|
|
|
|
|
|
|
CONSTRAINT fk_dm_device FOREIGN KEY (DEVICE_ID) REFERENCES
|
|
|
|
|
|
|
|
DM_DEVICE (ID) ON DELETE NO ACTION ON UPDATE NO ACTION,
|
|
|
|
|
|
|
|
CONSTRAINT fk_dm_application FOREIGN KEY (APPLICATION_ID) REFERENCES
|
|
|
|
|
|
|
|
DM_APPLICATION (ID) ON DELETE NO ACTION ON UPDATE NO ACTION
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS DM_POLICY_COMPLIANCE_STATUS (
|
|
|
|
CREATE TABLE IF NOT EXISTS DM_POLICY_COMPLIANCE_STATUS (
|
|
|
|
ID INT NOT NULL AUTO_INCREMENT,
|
|
|
|
ID INT NOT NULL AUTO_INCREMENT,
|
|
|
|
DEVICE_ID INT NOT NULL,
|
|
|
|
DEVICE_ID INT NOT NULL,
|
|
|
@ -353,6 +326,48 @@ CREATE TABLE IF NOT EXISTS DM_POLICY_COMPLIANCE_FEATURES (
|
|
|
|
ON UPDATE NO ACTION
|
|
|
|
ON UPDATE NO ACTION
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS DM_ENROLMENT (
|
|
|
|
|
|
|
|
ID INTEGER AUTO_INCREMENT NOT NULL,
|
|
|
|
|
|
|
|
DEVICE_ID INTEGER NOT NULL,
|
|
|
|
|
|
|
|
OWNER VARCHAR(50) NOT NULL,
|
|
|
|
|
|
|
|
OWNERSHIP VARCHAR(45) NULL DEFAULT NULL,
|
|
|
|
|
|
|
|
STATUS VARCHAR(50) NULL,
|
|
|
|
|
|
|
|
DATE_OF_ENROLMENT TIMESTAMP NULL DEFAULT NULL,
|
|
|
|
|
|
|
|
DATE_OF_LAST_UPDATE TIMESTAMP NULL DEFAULT NULL,
|
|
|
|
|
|
|
|
TENANT_ID INT NOT NULL,
|
|
|
|
|
|
|
|
PRIMARY KEY (ID),
|
|
|
|
|
|
|
|
CONSTRAINT fk_dm_device_enrolment FOREIGN KEY (DEVICE_ID) REFERENCES
|
|
|
|
|
|
|
|
DM_DEVICE (ID) ON DELETE NO ACTION ON UPDATE NO ACTION
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS DM_APPLICATION (
|
|
|
|
|
|
|
|
ID INTEGER AUTO_INCREMENT NOT NULL,
|
|
|
|
|
|
|
|
NAME VARCHAR(50) NOT NULL,
|
|
|
|
|
|
|
|
APP_IDENTIFIER VARCHAR(50) NOT NULL,
|
|
|
|
|
|
|
|
PLATFORM VARCHAR(50) NULL DEFAULT NULL,
|
|
|
|
|
|
|
|
CATEGORY VARCHAR(50) NULL,
|
|
|
|
|
|
|
|
VERSION VARCHAR(50) NULL,
|
|
|
|
|
|
|
|
TYPE VARCHAR(50) NULL,
|
|
|
|
|
|
|
|
LOCATION_URL VARCHAR(100) NULL DEFAULT NULL,
|
|
|
|
|
|
|
|
IMAGE_URL VARCHAR(100) NULL DEFAULT NULL,
|
|
|
|
|
|
|
|
APP_PROPERTIES BLOB NULL,
|
|
|
|
|
|
|
|
TENANT_ID INTEGER NOT NULL,
|
|
|
|
|
|
|
|
PRIMARY KEY (ID)
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS DM_DEVICE_APPLICATION_MAPPING (
|
|
|
|
|
|
|
|
ID INTEGER AUTO_INCREMENT NOT NULL,
|
|
|
|
|
|
|
|
DEVICE_ID INTEGER NOT NULL,
|
|
|
|
|
|
|
|
APPLICATION_ID INTEGER NOT NULL,
|
|
|
|
|
|
|
|
TENANT_ID INTEGER NOT NULL,
|
|
|
|
|
|
|
|
PRIMARY KEY (ID),
|
|
|
|
|
|
|
|
CONSTRAINT fk_dm_device FOREIGN KEY (DEVICE_ID) REFERENCES
|
|
|
|
|
|
|
|
DM_DEVICE (ID) ON DELETE NO ACTION ON UPDATE NO ACTION,
|
|
|
|
|
|
|
|
CONSTRAINT fk_dm_application FOREIGN KEY (APPLICATION_ID) REFERENCES
|
|
|
|
|
|
|
|
DM_APPLICATION (ID) ON DELETE NO ACTION ON UPDATE NO ACTION
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- POLICY RELATED TABLES FINISHED --
|
|
|
|
-- POLICY RELATED TABLES FINISHED --
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|