From d8d61b75c23a6fe2231fe31c3d2db589e7e4a3ab Mon Sep 17 00:00:00 2001 From: Dunith Dhanushka Date: Wed, 2 Aug 2017 15:09:05 +0530 Subject: [PATCH] Removing DEFAULT NULL clause from DM_DEVICE_PROPERTIES table. (#872) --- .../src/main/resources/dbscripts/cdm/h2.sql | 2 +- .../src/main/resources/dbscripts/cdm/mssql.sql | 2 +- .../src/main/resources/dbscripts/cdm/mysql.sql | 4 ++-- .../src/main/resources/dbscripts/cdm/oracle.sql | 3 +-- .../src/main/resources/dbscripts/cdm/postgresql.sql | 2 +- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/h2.sql b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/h2.sql index 1832253f04d..686d0a6b3b9 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/h2.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/h2.sql @@ -46,7 +46,7 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_PROPERTIES ( DEVICE_IDENTIFICATION VARCHAR(300) NOT NULL, PROPERTY_NAME VARCHAR(100) DEFAULT 0, PROPERTY_VALUE VARCHAR(100) DEFAULT NULL, - TENANT_ID VARCHAR(100) DEFAULT NULL, + TENANT_ID VARCHAR(100), PRIMARY KEY (DEVICE_TYPE_NAME, DEVICE_IDENTIFICATION, PROPERTY_NAME, TENANT_ID) ); diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mssql.sql b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mssql.sql index 0daf51dcf60..9168a38a465 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mssql.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mssql.sql @@ -60,7 +60,7 @@ CREATE TABLE DM_DEVICE_PROPERTIES ( DEVICE_IDENTIFICATION VARCHAR(300) NOT NULL, PROPERTY_NAME VARCHAR(100) DEFAULT 0, PROPERTY_VALUE VARCHAR(100) DEFAULT NULL, - TENANT_ID VARCHAR(100) DEFAULT NULL, + TENANT_ID VARCHAR(100), PRIMARY KEY (DEVICE_TYPE_NAME, DEVICE_IDENTIFICATION, PROPERTY_NAME, TENANT_ID) ); diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mysql.sql b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mysql.sql index 9d589ff974d..7fb1098521a 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mysql.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mysql.sql @@ -54,7 +54,7 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_PROPERTIES ( DEVICE_IDENTIFICATION VARCHAR(300) NOT NULL, PROPERTY_NAME VARCHAR(100) DEFAULT 0, PROPERTY_VALUE VARCHAR(100) DEFAULT NULL, - TENANT_ID VARCHAR(100) DEFAULT NULL, + TENANT_ID VARCHAR(100), PRIMARY KEY (DEVICE_TYPE_NAME, DEVICE_IDENTIFICATION, PROPERTY_NAME, TENANT_ID) )ENGINE = InnoDB; @@ -586,4 +586,4 @@ 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 -- \ No newline at end of file +-- END OF DASHBOARD RELATED VIEWS -- 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 8d17ac11c05..b889f47e486 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 @@ -106,7 +106,7 @@ CREATE TABLE DM_DEVICE_PROPERTIES ( DEVICE_IDENTIFICATION VARCHAR2(300) NOT NULL, PROPERTY_NAME VARCHAR2(100) DEFAULT 0, PROPERTY_VALUE VARCHAR2(100) DEFAULT NULL, - TENANT_ID VARCHAR2(100) DEFAULT NULL, + TENANT_ID VARCHAR2(100), CONSTRAINT PK_DM_DEVICE_PROPERTY PRIMARY KEY (DEVICE_TYPE_NAME, DEVICE_IDENTIFICATION, PROPERTY_NAME, TENANT_ID) ) / @@ -928,4 +928,3 @@ DM_DEVICE.ID = DM_DEVICE_DETAIL.DEVICE_ID / -- END OF DASHBOARD RELATED VIEWS -- - 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 d588b3dccc3..fd087509a44 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 @@ -44,7 +44,7 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_PROPERTIES ( DEVICE_IDENTIFICATION VARCHAR(300) NOT NULL, PROPERTY_NAME VARCHAR(100) DEFAULT 0, PROPERTY_VALUE VARCHAR(100) DEFAULT NULL, - TENANT_ID VARCHAR(100) DEFAULT NULL, + TENANT_ID VARCHAR(100), PRIMARY KEY (DEVICE_TYPE_NAME, DEVICE_IDENTIFICATION, PROPERTY_NAME, TENANT_ID) );