|
|
|
@ -276,8 +276,6 @@ CREATE TABLE IF NOT EXISTS DM_POLICY_CRITERIA (
|
|
|
|
|
ON UPDATE NO ACTION
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS DM_POLICY_CRITERIA_PROPERTIES (
|
|
|
|
|
ID INT NOT NULL AUTO_INCREMENT,
|
|
|
|
|
POLICY_CRITERION_ID INT NOT NULL,
|
|
|
|
@ -292,6 +290,45 @@ CREATE TABLE IF NOT EXISTS DM_POLICY_CRITERIA_PROPERTIES (
|
|
|
|
|
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,
|
|
|
|
|
PACKAGE_NAME 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,
|
|
|
|
|
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 --
|
|
|
|
|
|
|
|
|
|