Fixed Oracle driver related syntax issues and table names

revert-70aa11f8
Dileesha Rajapakse 9 years ago
parent e5586ea9fc
commit 8821227de2

@ -100,11 +100,11 @@ CREATE TABLE DM_DEVICE_GROUP_MAP (
REFERENCES DM_DEVICE (ID),
CONSTRAINT fk_DM_DEV_GROUP_MAP_DM_GROUP2 FOREIGN KEY (GROUP_ID)
REFERENCES DM_GROUP (ID)
);
)
/
-- Generate ID using sequence and trigger
CREATE SEQUENCE DM_DEVICE_GROUP_MAP_seq START WITH 1 INCREMENT BY 1;
CREATE SEQUENCE DM_DEVICE_GROUP_MAP_seq START WITH 1 INCREMENT BY 1 NOCACHE
/
CREATE OR REPLACE TRIGGER DM_DEVICE_GROUP_MAP_seq_tr
BEFORE INSERT ON DM_DEVICE_GROUP_MAP FOR EACH ROW
WHEN (NEW.ID IS NULL)
@ -631,11 +631,11 @@ CREATE TABLE DM_DEVICE_GROUP_POLICY (
CONSTRAINT FK_DM_DEVICE_GROUP_DM_POLICY
FOREIGN KEY (POLICY_ID)
REFERENCES DM_POLICY (ID)
) ;
)
/
-- Generate ID using sequence and trigger
CREATE SEQUENCE DM_DEVICE_GROUP_POLICY_seq START WITH 1 INCREMENT BY 1;
CREATE SEQUENCE DM_DEVICE_GROUP_POLICY_seq START WITH 1 INCREMENT BY 1 NOCACHE
/
CREATE OR REPLACE TRIGGER DM_DEVICE_GROUP_POLICY_seq_tr
BEFORE INSERT ON DM_DEVICE_GROUP_POLICY FOR EACH ROW
WHEN (NEW.ID IS NULL)
@ -756,11 +756,11 @@ CREATE TABLE DM_DEVICE_INFO (
FOREIGN KEY (DEVICE_ID)
REFERENCES DM_DEVICE (ID)
)
;
/
-- Generate ID using sequence and trigger
CREATE SEQUENCE DM_DEVICE_INFO_seq START WITH 1 INCREMENT BY 1;
CREATE SEQUENCE DM_DEVICE_INFO_seq START WITH 1 INCREMENT BY 1 NOCACHE
/
CREATE OR REPLACE TRIGGER DM_DEVICE_INFO_seq_tr
BEFORE INSERT ON DM_DEVICE_INFO FOR EACH ROW
WHEN (NEW.ID IS NULL)
@ -794,11 +794,11 @@ CREATE TABLE DM_DEVICE_LOCATION (
FOREIGN KEY (DEVICE_ID)
REFERENCES DM_DEVICE (ID)
)
;
/
-- Generate ID using sequence and trigger
CREATE SEQUENCE DM_DEVICE_LOCATION_seq START WITH 1 INCREMENT BY 1;
CREATE SEQUENCE DM_DEVICE_LOCATION_seq START WITH 1 INCREMENT BY 1 NOCACHE
/
CREATE OR REPLACE TRIGGER DM_DEVICE_LOCATION_seq_tr
BEFORE INSERT ON DM_DEVICE_LOCATION FOR EACH ROW
WHEN (NEW.ID IS NULL)
@ -836,11 +836,11 @@ CREATE TABLE DM_DEVICE_DETAIL (
CONSTRAINT FK_DM_DEVICE_DETAILS_DEVICE
FOREIGN KEY (DEVICE_ID)
REFERENCES DM_DEVICE (ID)
);
)
/
-- Generate ID using sequence and trigger
CREATE SEQUENCE DM_DEVICE_DETAIL_seq START WITH 1 INCREMENT BY 1;
CREATE SEQUENCE DM_DEVICE_DETAIL_seq START WITH 1 INCREMENT BY 1 NOCACHE
/
CREATE OR REPLACE TRIGGER DM_DEVICE_DETAIL_seq_tr
BEFORE INSERT ON DM_DEVICE_DETAIL FOR EACH ROW
WHEN (NEW.ID IS NULL)
@ -851,7 +851,7 @@ WHEN (NEW.ID IS NULL)
-- DASHBOARD RELATED VIEWS --
CREATE VIEW DEVICES_WITH_POLICY_COMPLIANCE_STATUS AS
CREATE VIEW POLICY_COMPLIANCE_INFO AS
SELECT
DEVICE_INFO.DEVICE_ID,
DEVICE_INFO.DEVICE_IDENTIFICATION,
@ -879,8 +879,8 @@ 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 DEVICES_WITH_NON_COMPLIANT_FEATURES AS
/
CREATE VIEW FEATURE_NON_COMPLIANCE_INFO AS
SELECT
DM_DEVICE.ID AS DEVICE_ID,
DM_DEVICE.DEVICE_IDENTIFICATION,

Loading…
Cancel
Save