From 556c82b2e8f45af6faa79fe7a81f404e6562e965 Mon Sep 17 00:00:00 2001 From: harshanl Date: Tue, 23 Aug 2016 17:59:52 +0530 Subject: [PATCH] Fixed ORACLE DB script issue --- .../src/main/resources/dbscripts/cdm/oracle.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/oracle.sql b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/oracle.sql index 0b1256d5ee4..8c98587ffea 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/oracle.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/oracle.sql @@ -7,16 +7,16 @@ CREATE TABLE DM_DEVICE_TYPE ( ) / -- Generate ID using sequence and trigger -CREATE SEQUENCE DM_DEVICE_TYPE_seq START WITH 1 INCREMENT BY 1 NOCACHE +CREATE SEQUENCE DM_DEVICE_TYPE_id_seq START WITH 1 INCREMENT BY 1 NOCACHE / -CREATE OR REPLACE TRIGGER DM_DEVICE_TYPE_seq_tr +CREATE OR REPLACE TRIGGER DM_DEVICE_TYPE_id_seq_tr BEFORE INSERT ON DM_DEVICE_TYPE REFERENCING NEW AS NEW FOR EACH ROW WHEN (NEW.ID IS NULL) BEGIN - SELECT DM_DEVICE_TYPE_seq.NEXTVAL INTO :NEW.ID FROM DUAL; + SELECT DM_DEVICE_TYPE_id_seq.NEXTVAL INTO :NEW.ID FROM DUAL; END; /