Adding device-identification attribute for database views in dashboard analytics feature

4.x.x
dilanua 9 years ago
parent 14c07846b2
commit e151bca0c7

@ -515,6 +515,7 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_GROUP_POLICY (
CREATE VIEW DEVICES_VIEW_1 AS CREATE VIEW DEVICES_VIEW_1 AS
SELECT SELECT
DEVICE_INFO.DEVICE_ID, DEVICE_INFO.DEVICE_ID,
DEVICE_INFO.DEVICE_IDENTIFICATION,
DEVICE_INFO.PLATFORM, DEVICE_INFO.PLATFORM,
DEVICE_INFO.OWNERSHIP, DEVICE_INFO.OWNERSHIP,
DEVICE_INFO.CONNECTIVITY_STATUS, DEVICE_INFO.CONNECTIVITY_STATUS,
@ -524,6 +525,7 @@ DEVICE_INFO.TENANT_ID
FROM FROM
(SELECT (SELECT
DM_DEVICE.ID AS DEVICE_ID, DM_DEVICE.ID AS DEVICE_ID,
DM_DEVICE.DEVICE_IDENTIFICATION,
DM_DEVICE_TYPE.NAME AS PLATFORM, DM_DEVICE_TYPE.NAME AS PLATFORM,
DM_ENROLMENT.OWNERSHIP, DM_ENROLMENT.OWNERSHIP,
DM_ENROLMENT.STATUS AS CONNECTIVITY_STATUS, DM_ENROLMENT.STATUS AS CONNECTIVITY_STATUS,
@ -542,6 +544,7 @@ ORDER BY DEVICE_INFO.DEVICE_ID;
CREATE VIEW DEVICES_VIEW_2 AS CREATE VIEW DEVICES_VIEW_2 AS
SELECT SELECT
DM_DEVICE.ID AS DEVICE_ID, DM_DEVICE.ID AS DEVICE_ID,
DM_DEVICE.DEVICE_IDENTIFICATION,
DM_DEVICE_DETAIL.DEVICE_MODEL, DM_DEVICE_DETAIL.DEVICE_MODEL,
DM_DEVICE_DETAIL.VENDOR, DM_DEVICE_DETAIL.VENDOR,
DM_DEVICE_DETAIL.OS_VERSION, DM_DEVICE_DETAIL.OS_VERSION,

@ -507,6 +507,7 @@ CREATE INDEX FK_DM_DEVICE_DETAILS_DEVICE_idx ON DM_DEVICE_DETAIL (DEVICE_ID ASC)
CREATE VIEW DEVICES_VIEW_1 AS CREATE VIEW DEVICES_VIEW_1 AS
SELECT TOP 100 PERCENT SELECT TOP 100 PERCENT
DEVICE_INFO.DEVICE_ID, DEVICE_INFO.DEVICE_ID,
DEVICE_INFO.DEVICE_IDENTIFICATION,
DEVICE_INFO.PLATFORM, DEVICE_INFO.PLATFORM,
DEVICE_INFO.OWNERSHIP, DEVICE_INFO.OWNERSHIP,
DEVICE_INFO.CONNECTIVITY_STATUS, DEVICE_INFO.CONNECTIVITY_STATUS,
@ -517,6 +518,7 @@ DEVICE_INFO.TENANT_ID
FROM FROM
(SELECT (SELECT
DM_DEVICE.ID AS DEVICE_ID, DM_DEVICE.ID AS DEVICE_ID,
DM_DEVICE.DEVICE_IDENTIFICATION,
DM_DEVICE_TYPE.NAME AS PLATFORM, DM_DEVICE_TYPE.NAME AS PLATFORM,
DM_ENROLMENT.OWNERSHIP, DM_ENROLMENT.OWNERSHIP,
DM_ENROLMENT.STATUS AS CONNECTIVITY_STATUS, DM_ENROLMENT.STATUS AS CONNECTIVITY_STATUS,
@ -537,6 +539,7 @@ GO
CREATE VIEW DEVICES_VIEW_2 AS CREATE VIEW DEVICES_VIEW_2 AS
SELECT TOP 100 PERCENT SELECT TOP 100 PERCENT
DM_DEVICE.ID AS DEVICE_ID, DM_DEVICE.ID AS DEVICE_ID,
DM_DEVICE.DEVICE_IDENTIFICATION,
DM_DEVICE_DETAIL.DEVICE_MODEL, DM_DEVICE_DETAIL.DEVICE_MODEL,
DM_DEVICE_DETAIL.VENDOR, DM_DEVICE_DETAIL.VENDOR,
DM_DEVICE_DETAIL.OS_VERSION, DM_DEVICE_DETAIL.OS_VERSION,

@ -527,6 +527,7 @@ ENGINE = InnoDB;
CREATE VIEW DEVICE_INFO_VIEW AS CREATE VIEW DEVICE_INFO_VIEW AS
SELECT SELECT
DM_DEVICE.ID AS DEVICE_ID, DM_DEVICE.ID AS DEVICE_ID,
DM_DEVICE.DEVICE_IDENTIFICATION,
DM_DEVICE_TYPE.NAME AS PLATFORM, DM_DEVICE_TYPE.NAME AS PLATFORM,
DM_ENROLMENT.OWNERSHIP, DM_ENROLMENT.OWNERSHIP,
DM_ENROLMENT.STATUS AS CONNECTIVITY_STATUS, DM_ENROLMENT.STATUS AS CONNECTIVITY_STATUS,
@ -544,6 +545,7 @@ FROM DM_POLICY_COMPLIANCE_STATUS;
CREATE VIEW DEVICES_VIEW_1 AS CREATE VIEW DEVICES_VIEW_1 AS
SELECT SELECT
DEVICE_INFO_VIEW.DEVICE_ID, DEVICE_INFO_VIEW.DEVICE_ID,
DEVICE_INFO_VIEW.DEVICE_IDENTIFICATION,
DEVICE_INFO_VIEW.PLATFORM, DEVICE_INFO_VIEW.PLATFORM,
DEVICE_INFO_VIEW.OWNERSHIP, DEVICE_INFO_VIEW.OWNERSHIP,
DEVICE_INFO_VIEW.CONNECTIVITY_STATUS, DEVICE_INFO_VIEW.CONNECTIVITY_STATUS,
@ -560,6 +562,7 @@ ORDER BY DEVICE_INFO_VIEW.DEVICE_ID;
CREATE VIEW DEVICES_VIEW_2 AS CREATE VIEW DEVICES_VIEW_2 AS
SELECT SELECT
DM_DEVICE.ID AS DEVICE_ID, DM_DEVICE.ID AS DEVICE_ID,
DM_DEVICE.DEVICE_IDENTIFICATION,
DM_DEVICE_DETAIL.DEVICE_MODEL, DM_DEVICE_DETAIL.DEVICE_MODEL,
DM_DEVICE_DETAIL.VENDOR, DM_DEVICE_DETAIL.VENDOR,
DM_DEVICE_DETAIL.OS_VERSION, DM_DEVICE_DETAIL.OS_VERSION,

@ -853,6 +853,7 @@ WHEN (NEW.ID IS NULL)
CREATE VIEW DEVICES_VIEW_1 AS CREATE VIEW DEVICES_VIEW_1 AS
SELECT SELECT
DEVICE_INFO.DEVICE_ID, DEVICE_INFO.DEVICE_ID,
DEVICE_INFO.DEVICE_IDENTIFICATION,
DEVICE_INFO.PLATFORM, DEVICE_INFO.PLATFORM,
DEVICE_INFO.OWNERSHIP, DEVICE_INFO.OWNERSHIP,
DEVICE_INFO.CONNECTIVITY_STATUS, DEVICE_INFO.CONNECTIVITY_STATUS,
@ -862,6 +863,7 @@ DEVICE_INFO.TENANT_ID
FROM FROM
(SELECT (SELECT
DM_DEVICE.ID AS DEVICE_ID, DM_DEVICE.ID AS DEVICE_ID,
DM_DEVICE.DEVICE_IDENTIFICATION,
DM_DEVICE_TYPE.NAME AS PLATFORM, DM_DEVICE_TYPE.NAME AS PLATFORM,
DM_ENROLMENT.OWNERSHIP, DM_ENROLMENT.OWNERSHIP,
DM_ENROLMENT.STATUS AS CONNECTIVITY_STATUS, DM_ENROLMENT.STATUS AS CONNECTIVITY_STATUS,
@ -880,6 +882,7 @@ ORDER BY DEVICE_INFO.DEVICE_ID;
CREATE VIEW DEVICES_VIEW_2 AS CREATE VIEW DEVICES_VIEW_2 AS
SELECT SELECT
DM_DEVICE.ID AS DEVICE_ID, DM_DEVICE.ID AS DEVICE_ID,
DM_DEVICE.DEVICE_IDENTIFICATION,
DM_DEVICE_DETAIL.DEVICE_MODEL, DM_DEVICE_DETAIL.DEVICE_MODEL,
DM_DEVICE_DETAIL.VENDOR, DM_DEVICE_DETAIL.VENDOR,
DM_DEVICE_DETAIL.OS_VERSION, DM_DEVICE_DETAIL.OS_VERSION,

@ -434,6 +434,7 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_DETAIL (
CREATE VIEW DEVICES_VIEW_1 AS CREATE VIEW DEVICES_VIEW_1 AS
SELECT SELECT
DEVICE_INFO.DEVICE_ID, DEVICE_INFO.DEVICE_ID,
DEVICE_INFO.DEVICE_IDENTIFICATION,
DEVICE_INFO.PLATFORM, DEVICE_INFO.PLATFORM,
DEVICE_INFO.OWNERSHIP, DEVICE_INFO.OWNERSHIP,
DEVICE_INFO.CONNECTIVITY_STATUS, DEVICE_INFO.CONNECTIVITY_STATUS,
@ -443,6 +444,7 @@ DEVICE_INFO.TENANT_ID
FROM FROM
(SELECT (SELECT
DM_DEVICE.ID AS DEVICE_ID, DM_DEVICE.ID AS DEVICE_ID,
DM_DEVICE.DEVICE_IDENTIFICATION,
DM_DEVICE_TYPE.NAME AS PLATFORM, DM_DEVICE_TYPE.NAME AS PLATFORM,
DM_ENROLMENT.OWNERSHIP, DM_ENROLMENT.OWNERSHIP,
DM_ENROLMENT.STATUS AS CONNECTIVITY_STATUS, DM_ENROLMENT.STATUS AS CONNECTIVITY_STATUS,
@ -461,6 +463,7 @@ ORDER BY DEVICE_INFO.DEVICE_ID;
CREATE VIEW DEVICES_VIEW_2 AS CREATE VIEW DEVICES_VIEW_2 AS
SELECT SELECT
DM_DEVICE.ID AS DEVICE_ID, DM_DEVICE.ID AS DEVICE_ID,
DM_DEVICE.DEVICE_IDENTIFICATION,
DM_DEVICE_DETAIL.DEVICE_MODEL, DM_DEVICE_DETAIL.DEVICE_MODEL,
DM_DEVICE_DETAIL.VENDOR, DM_DEVICE_DETAIL.VENDOR,
DM_DEVICE_DETAIL.OS_VERSION, DM_DEVICE_DETAIL.OS_VERSION,

Loading…
Cancel
Save