|
|
|
@ -3,7 +3,8 @@ CREATE TABLE DM_DEVICE_TYPE (
|
|
|
|
|
NAME VARCHAR2(300) DEFAULT NULL,
|
|
|
|
|
PROVIDER_TENANT_ID INTEGER DEFAULT 0,
|
|
|
|
|
SHARED_WITH_ALL_TENANTS NUMBER(1) DEFAULT 0 NOT NULL,
|
|
|
|
|
CONSTRAINT PK_DM_DEVICE_TYPE PRIMARY KEY (ID)
|
|
|
|
|
CONSTRAINT PK_DM_DEVICE_TYPE PRIMARY KEY (ID),
|
|
|
|
|
UNIQUE (NAME)
|
|
|
|
|
)
|
|
|
|
|
/
|
|
|
|
|
-- Generate ID using sequence and trigger
|
|
|
|
@ -44,16 +45,6 @@ WHEN (NEW.ID IS NULL)
|
|
|
|
|
SELECT DM_GROUP_seq.NEXTVAL INTO :NEW.ID FROM DUAL;
|
|
|
|
|
END;
|
|
|
|
|
/
|
|
|
|
|
-- Generate ID using sequence and trigger
|
|
|
|
|
CREATE SEQUENCE DM_DEVICE_CERTIFICATE_seq START WITH 1 INCREMENT BY 1 NOCACHE
|
|
|
|
|
/
|
|
|
|
|
CREATE OR REPLACE TRIGGER DM_DEVICE_CERTIFICATE_seq_tr
|
|
|
|
|
BEFORE INSERT ON DM_DEVICE_CERTIFICATE FOR EACH ROW
|
|
|
|
|
WHEN (NEW.ID IS NULL)
|
|
|
|
|
BEGIN
|
|
|
|
|
SELECT DM_DEVICE_CERTIFICATE_seq.NEXTVAL INTO :NEW.ID FROM DUAL;
|
|
|
|
|
END;
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
CREATE TABLE DM_DEVICE (
|
|
|
|
|
ID NUMBER(10) NOT NULL,
|
|
|
|
@ -436,7 +427,7 @@ CREATE TABLE DM_DEVICE_POLICY_APPLIED (
|
|
|
|
|
POLICY_ID NUMBER(10) NOT NULL ,
|
|
|
|
|
POLICY_CONTENT BLOB NULL ,
|
|
|
|
|
TENANT_ID NUMBER(10) NOT NULL,
|
|
|
|
|
APPLIED BOOLEAN NULL ,
|
|
|
|
|
APPLIED NUMBER(1) DEFAULT 0,
|
|
|
|
|
CREATED_TIME TIMESTAMP(0) NULL ,
|
|
|
|
|
UPDATED_TIME TIMESTAMP(0) NULL ,
|
|
|
|
|
APPLIED_TIME TIMESTAMP(0) NULL ,
|
|
|
|
@ -860,8 +851,8 @@ POLICY_ID,
|
|
|
|
|
STATUS AS IS_COMPLIANT
|
|
|
|
|
FROM DM_POLICY_COMPLIANCE_STATUS) DEVICE_WITH_POLICY_INFO
|
|
|
|
|
ON DEVICE_INFO.DEVICE_ID = DEVICE_WITH_POLICY_INFO.DEVICE_ID
|
|
|
|
|
ORDER BY DEVICE_INFO.DEVICE_ID;
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
CREATE VIEW FEATURE_NON_COMPLIANCE_INFO AS
|
|
|
|
|
SELECT
|
|
|
|
|
DM_DEVICE.ID AS DEVICE_ID,
|
|
|
|
@ -885,7 +876,7 @@ DM_POLICY_COMPLIANCE_STATUS.ENROLMENT_ID = DM_ENROLMENT.ID AND
|
|
|
|
|
DM_POLICY_COMPLIANCE_STATUS.DEVICE_ID = DM_DEVICE.ID AND
|
|
|
|
|
DM_DEVICE.DEVICE_TYPE_ID = DM_DEVICE_TYPE.ID AND
|
|
|
|
|
DM_DEVICE.ID = DM_DEVICE_DETAIL.DEVICE_ID
|
|
|
|
|
ORDER BY TENANT_ID, DEVICE_ID;
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
-- END OF DASHBOARD RELATED VIEWS --
|
|
|
|
|
|
|
|
|
|