From 0ad9d1bd16d7eea5acec2d337c836ad02ea1f117 Mon Sep 17 00:00:00 2001 From: harshanL Date: Thu, 18 Dec 2014 10:52:51 +0530 Subject: [PATCH] Added device type insert query to h2 database script --- .../java/org/wso2/carbon/device/mgt/core/DeviceManager.java | 1 - .../distribution/src/repository/dbscripts/cdm/plugins/h2.sql | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManager.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManager.java index ffa935461f..6f62ea8d0e 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManager.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManager.java @@ -60,7 +60,6 @@ public class DeviceManager implements DeviceManagerService { Integer deviceTypeId = this.getDeviceDAO().getDeviceTypeIdByDeviceTypeName(device.getType()); deviceDto.setDeviceType(deviceTypeId); this.getDeviceDAO().addDevice(deviceDto); - } catch (DeviceManagementDAOException e) { throw new DeviceManagementException("Error occurred while enrolling the device '" + device.getId() + "'", e); diff --git a/product/modules/distribution/src/repository/dbscripts/cdm/plugins/h2.sql b/product/modules/distribution/src/repository/dbscripts/cdm/plugins/h2.sql index e426421494..ed495ac190 100644 --- a/product/modules/distribution/src/repository/dbscripts/cdm/plugins/h2.sql +++ b/product/modules/distribution/src/repository/dbscripts/cdm/plugins/h2.sql @@ -3,7 +3,7 @@ CREATE TABLE IF NOT EXISTS MBL_DEVICE MOBILE_DEVICE_ID VARCHAR(45) NOT NULL, REG_ID VARCHAR(45) NOT NULL, IMEI VARCHAR(45) NOT NULL, - IMSI VARCHAR(45) NOT NULL, + IMSI VARCHAR(45), OS_VERSION VARCHAR(45) NOT NULL, DEVICE_MODEL VARCHAR(45) NOT NULL, VENDOR VARCHAR(45) NOT NULL,