From 9b6973226c6e4b4c9575fd58434e1a6b2da96498 Mon Sep 17 00:00:00 2001 From: harshanl Date: Fri, 23 Sep 2016 11:29:58 +0530 Subject: [PATCH] EMM-1609 : Changed postgres and oracle db scripts to support boolean data --- .../src/main/resources/dbscripts/cdm/oracle.sql | 2 +- .../src/main/resources/dbscripts/cdm/postgresql.sql | 4 ++-- 2 files 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 e889251f934..39785fc5321 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 @@ -436,7 +436,7 @@ CREATE TABLE DM_DEVICE_POLICY_APPLIED ( POLICY_ID NUMBER(10) NOT NULL , POLICY_CONTENT BLOB NULL , TENANT_ID NUMBER(10) NOT NULL, - APPLIED NUMBER(3) NULL , + APPLIED BOOLEAN NULL , CREATED_TIME TIMESTAMP(0) NULL , UPDATED_TIME TIMESTAMP(0) NULL , APPLIED_TIME TIMESTAMP(0) NULL , diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/postgresql.sql b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/postgresql.sql index c124b0d4963..54489b81579 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/postgresql.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/postgresql.sql @@ -222,11 +222,11 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_POLICY_APPLIED ( POLICY_ID INTEGER NOT NULL , POLICY_CONTENT BYTEA NULL , TENANT_ID INTEGER NOT NULL, - APPLIED INTEGER[1] NULL , + APPLIED BOOLEAN NULL , CREATED_TIME TIMESTAMP NULL , UPDATED_TIME TIMESTAMP NULL , APPLIED_TIME TIMESTAMP NULL , - CONSTRAINT FK_DM_POLICY_DEVCIE_APPLIED + CONSTRAINT FK_DM_POLICY_DEVICE_APPLIED FOREIGN KEY (DEVICE_ID ) REFERENCES DM_DEVICE (ID ) ON DELETE NO ACTION