From c09e16021ea2bdba051c9cbdc4c5af8082136515 Mon Sep 17 00:00:00 2001 From: prabathabey Date: Fri, 20 Mar 2015 18:06:37 +0530 Subject: [PATCH] Adding feature management features --- .../src/main/resources/sql/h2.sql | 0 .../src/test/resources/sql/CreateH2TestDB.sql | 88 ------------------- .../src/test/resources/sql/h2.sql | 0 3 files changed, 88 deletions(-) create mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/resources/sql/h2.sql delete mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/test/resources/sql/CreateH2TestDB.sql create mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/test/resources/sql/h2.sql diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/resources/sql/h2.sql b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/resources/sql/h2.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/test/resources/sql/CreateH2TestDB.sql b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/test/resources/sql/CreateH2TestDB.sql deleted file mode 100644 index a33e6d477d..0000000000 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/test/resources/sql/CreateH2TestDB.sql +++ /dev/null @@ -1,88 +0,0 @@ - --- ----------------------------------------------------- --- Table `MBL_DEVICE` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `MBL_DEVICE` ( - `MOBILE_DEVICE_ID` VARCHAR(45) NOT NULL , - `PUSH_TOKEN` VARCHAR(45) NULL DEFAULT NULL , - `IMEI` VARCHAR(45) NULL DEFAULT NULL , - `IMSI` VARCHAR(45) NULL DEFAULT NULL , - `OS_VERSION` VARCHAR(45) NULL DEFAULT NULL , - `DEVICE_MODEL` VARCHAR(45) NULL DEFAULT NULL , - `VENDOR` VARCHAR(45) NULL DEFAULT NULL , - `LATITUDE` VARCHAR(45) NULL DEFAULT NULL, - `LONGITUDE` VARCHAR(45) NULL DEFAULT NULL, - `CHALLENGE` VARCHAR(45) NULL DEFAULT NULL, - `TOKEN` VARCHAR(500) NULL DEFAULT NULL, - `UNLOCK_TOKEN` VARCHAR(500) NULL DEFAULT NULL, - `SERIAL` VARCHAR(45) NULL DEFAULT NULL, - PRIMARY KEY (`MOBILE_DEVICE_ID`) ); - - --- ----------------------------------------------------- --- Table `MBL_FEATURE` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `MBL_FEATURE` ( - `FEATURE_ID` INT NOT NULL AUTO_INCREMENT , - `CODE` VARCHAR(45) NOT NULL, - `NAME` VARCHAR(100) NULL , - `DESCRIPTION` VARCHAR(200) NULL , - `DEVICE_TYPE` VARCHAR(50) NULL , - PRIMARY KEY (`FEATURE_ID`) ); - --- ----------------------------------------------------- --- Table `MBL_OPERATION` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `MBL_OPERATION` ( - `OPERATION_ID` INT NOT NULL AUTO_INCREMENT , - `FEATURE_CODE` VARCHAR(45) NOT NULL , - `CREATED_DATE` BIGINT NULL , - PRIMARY KEY (`OPERATION_ID`)); - --- ----------------------------------------------------- --- Table `MBL_DEVICE_OPERATION_MAPPING` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `MBL_DEVICE_OPERATION_MAPPING` ( - `DEVICE_ID` VARCHAR(45) NOT NULL , - `OPERATION_ID` INT NOT NULL , - `SENT_DATE` BIGINT NULL , - `RECEIVED_DATE` BIGINT NULL , - `STATUS` VARCHAR(10) NOT NULL , - PRIMARY KEY (`DEVICE_ID`, `OPERATION_ID`) , - CONSTRAINT `fk_MBL_DEVICE_OPERATION_MBL_DEVICE` - FOREIGN KEY (`DEVICE_ID` ) - REFERENCES `MBL_DEVICE` (`MOBILE_DEVICE_ID` ) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_MBL_DEVICE_OPERATION_MBL_OPERATION1` - FOREIGN KEY (`OPERATION_ID` ) - REFERENCES `MBL_OPERATION` (`OPERATION_ID` ) - ON DELETE NO ACTION - ON UPDATE NO ACTION); - --- ----------------------------------------------------- --- Table `MBL_OPERATION_PROPERTY` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `MBL_OPERATION_PROPERTY` ( - `OPERATION_ID` INT NOT NULL , - `PROPERTY` VARCHAR(45) NOT NULL , - `VALUE` TEXT NULL , - PRIMARY KEY (`OPERATION_ID`, `PROPERTY`) , - CONSTRAINT `fk_MBL_OPERATION_PROPERTY_MBL_OPERATION1` - FOREIGN KEY (`OPERATION_ID` ) - REFERENCES `MBL_OPERATION` (`OPERATION_ID` ) - ON DELETE NO ACTION - ON UPDATE NO ACTION); - --- ----------------------------------------------------- --- Table `MBL_FEATURE_PROPERTY` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `MBL_FEATURE_PROPERTY` ( - `PROPERTY` VARCHAR(45) NOT NULL , - `FEATURE_ID` INT NOT NULL , - PRIMARY KEY (`PROPERTY`) , - CONSTRAINT `fk_MBL_FEATURE_PROPERTY_MBL_FEATURE1` - FOREIGN KEY (`FEATURE_ID` ) - REFERENCES `MBL_FEATURE` (`FEATURE_ID` ) - ON DELETE NO ACTION - ON UPDATE NO ACTION); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/test/resources/sql/h2.sql b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/test/resources/sql/h2.sql new file mode 100644 index 0000000000..e69de29bb2