From 7e2c0a2d5d2782a133ae9d54b423e052c1486aca Mon Sep 17 00:00:00 2001 From: Dilshan Edirisuriya Date: Fri, 28 Aug 2015 15:10:25 +0530 Subject: [PATCH 1/2] Refactoring sql --- .../resources/dbscripts/plugins/h2_ios.sql | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.mobile.feature/src/main/resources/dbscripts/plugins/h2_ios.sql b/features/device-mgt/org.wso2.carbon.device.mgt.mobile.feature/src/main/resources/dbscripts/plugins/h2_ios.sql index c90227a654..52f30b57ee 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.mobile.feature/src/main/resources/dbscripts/plugins/h2_ios.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.mobile.feature/src/main/resources/dbscripts/plugins/h2_ios.sql @@ -15,21 +15,21 @@ CREATE TABLE IF NOT EXISTS `IOS_FEATURE` ( CREATE TABLE IF NOT EXISTS `IOS_DEVICE` ( `MOBILE_DEVICE_ID` VARCHAR(45) NOT NULL, - `APNS_PUSH_TOKEN` VARCHAR(100) NULL DEFAULT NULL, - `MAGIC_TOKEN` VARCHAR(100) NULL DEFAULT NULL, - `MDM_TOKEN` VARCHAR(100) NULL DEFAULT NULL, - `UNLOCK_TOKEN` VARCHAR(2000) NULL DEFAULT NULL, - `CHALLENGE_TOKEN` VARCHAR(45) NULL DEFAULT NULL, - `DEVICE_INFO` VARCHAR(8000) NULL DEFAULT NULL, - `SERIAL` VARCHAR(45) NULL DEFAULT NULL, - `PRODUCT` VARCHAR(45) NULL DEFAULT NULL, - `IMEI` VARCHAR(45) NULL DEFAULT NULL, - `VERSION` VARCHAR(45) NULL DEFAULT NULL, - `MAC_ADDRESS` VARCHAR(45) NULL DEFAULT NULL, - `DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL, - `ICCID` VARCHAR(45) NULL DEFAULT NULL, - `LATITUDE` VARCHAR(45) NULL DEFAULT NULL, - `LONGITUDE` VARCHAR(45) NULL DEFAULT NULL, + `APNS_PUSH_TOKEN` VARCHAR(100) DEFAULT NULL, + `MAGIC_TOKEN` VARCHAR(100) DEFAULT NULL, + `MDM_TOKEN` VARCHAR(100) DEFAULT NULL, + `UNLOCK_TOKEN` VARCHAR(2000) DEFAULT NULL, + `CHALLENGE_TOKEN` VARCHAR(45) DEFAULT NULL, + `DEVICE_INFO` VARCHAR(8000) DEFAULT NULL, + `SERIAL` VARCHAR(45) DEFAULT NULL, + `PRODUCT` VARCHAR(45) DEFAULT NULL, + `IMEI` VARCHAR(45) DEFAULT NULL, + `VERSION` VARCHAR(45) DEFAULT NULL, + `MAC_ADDRESS` VARCHAR(45) DEFAULT NULL, + `DEVICE_NAME` VARCHAR(100) DEFAULT NULL, + `ICCID` VARCHAR(45) DEFAULT NULL, + `LATITUDE` VARCHAR(45) DEFAULT NULL, + `LONGITUDE` VARCHAR(45) DEFAULT NULL, PRIMARY KEY (`MOBILE_DEVICE_ID`) ); From 243536fb7e6f8ab7ccfd9af65da18075038f83ad Mon Sep 17 00:00:00 2001 From: Kasun Delgolla Date: Wed, 9 Sep 2015 17:13:54 +0530 Subject: [PATCH 2/2] Changing the char length of GCM_TOKEN DB column. --- .../src/main/resources/dbscripts/plugins/h2_android.sql | 2 +- .../src/main/resources/dbscripts/plugins/mysql_android.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.mobile.feature/src/main/resources/dbscripts/plugins/h2_android.sql b/features/device-mgt/org.wso2.carbon.device.mgt.mobile.feature/src/main/resources/dbscripts/plugins/h2_android.sql index c6ae33335a..f7b2d1818e 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.mobile.feature/src/main/resources/dbscripts/plugins/h2_android.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.mobile.feature/src/main/resources/dbscripts/plugins/h2_android.sql @@ -4,7 +4,7 @@ -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `AD_DEVICE` ( `ANDROID_DEVICE_ID` VARCHAR(45) NOT NULL , - `GCM_TOKEN` VARCHAR(45) NULL DEFAULT NULL , + `GCM_TOKEN` VARCHAR(1000) NULL DEFAULT NULL , `DEVICE_INFO` VARCHAR(8000) NULL DEFAULT NULL , `IMEI` VARCHAR(45) NULL DEFAULT NULL , `IMSI` VARCHAR(45) NULL DEFAULT NULL , diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.mobile.feature/src/main/resources/dbscripts/plugins/mysql_android.sql b/features/device-mgt/org.wso2.carbon.device.mgt.mobile.feature/src/main/resources/dbscripts/plugins/mysql_android.sql index dff4740712..ae1211862c 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.mobile.feature/src/main/resources/dbscripts/plugins/mysql_android.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.mobile.feature/src/main/resources/dbscripts/plugins/mysql_android.sql @@ -4,7 +4,7 @@ CREATE TABLE IF NOT EXISTS `AD_DEVICE` ( `ANDROID_DEVICE_ID` VARCHAR(45) NOT NULL , `DEVICE_INFO` VARCHAR(500) NULL DEFAULT NULL , - `GCM_TOKEN` VARCHAR(45) NULL DEFAULT NULL , + `GCM_TOKEN` VARCHAR(1000) NULL DEFAULT NULL , `IMEI` VARCHAR(45) NULL DEFAULT NULL , `IMSI` VARCHAR(45) NULL DEFAULT NULL , `OS_VERSION` VARCHAR(45) NULL DEFAULT NULL ,