|
|
|
@ -10,6 +10,8 @@ CREATE TABLE IF NOT EXISTS `MBL_DEVICE` (
|
|
|
|
|
`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,
|
|
|
|
|
PRIMARY KEY (`MOBILE_DEVICE_ID`) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -18,7 +20,7 @@ CREATE TABLE IF NOT EXISTS `MBL_DEVICE` (
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `MBL_FEATURE` (
|
|
|
|
|
`FEATURE_ID` INT NOT NULL AUTO_INCREMENT ,
|
|
|
|
|
`CODE` VARCHAR(45) NULL ,
|
|
|
|
|
`CODE` VARCHAR(45) NOT NULL ,
|
|
|
|
|
`NAME` VARCHAR(100) NULL ,
|
|
|
|
|
`DESCRIPTION` VARCHAR(200) NULL ,
|
|
|
|
|
PRIMARY KEY (`FEATURE_ID`) );
|
|
|
|
@ -28,23 +30,18 @@ CREATE TABLE IF NOT EXISTS `MBL_FEATURE` (
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `MBL_OPERATION` (
|
|
|
|
|
`OPERATION_ID` INT NOT NULL AUTO_INCREMENT ,
|
|
|
|
|
`FEATURE_CODE` VARCHAR(45) NULL ,
|
|
|
|
|
`CREATED_DATE` INT NULL ,
|
|
|
|
|
PRIMARY KEY (`OPERATION_ID`) ,
|
|
|
|
|
CONSTRAINT `fk_MBL_OPERATION_MBL_FEATURES1`
|
|
|
|
|
FOREIGN KEY (`FEATURE_CODE` )
|
|
|
|
|
REFERENCES `MBL_FEATURE` (`CODE` )
|
|
|
|
|
ON DELETE NO ACTION
|
|
|
|
|
ON UPDATE NO ACTION);
|
|
|
|
|
`FEATURE_CODE` VARCHAR(45) NOT NULL ,
|
|
|
|
|
`CREATED_DATE` LONG NULL ,
|
|
|
|
|
PRIMARY KEY (`OPERATION_ID`));
|
|
|
|
|
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
-- Table `MBL_DEVICE_OPERATION_MAPING`
|
|
|
|
|
-- Table `MBL_DEVICE_OPERATION_MAPPING`
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `MBL_DEVICE_OPERATION_MAPING` (
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `MBL_DEVICE_OPERATION_MAPPING` (
|
|
|
|
|
`DEVICE_ID` VARCHAR(45) NOT NULL ,
|
|
|
|
|
`OPERATION_ID` INT NOT NULL ,
|
|
|
|
|
`SENT_DATE` INT NULL ,
|
|
|
|
|
`RECEIVED_DATE` INT NULL ,
|
|
|
|
|
`SENT_DATE` LONG NULL ,
|
|
|
|
|
`RECEIVED_DATE` LONG NULL ,
|
|
|
|
|
PRIMARY KEY (`DEVICE_ID`, `OPERATION_ID`) ,
|
|
|
|
|
CONSTRAINT `fk_MBL_DEVICE_OPERATION_MBL_DEVICE`
|
|
|
|
|
FOREIGN KEY (`DEVICE_ID` )
|
|
|
|
@ -61,11 +58,10 @@ CREATE TABLE IF NOT EXISTS `MBL_DEVICE_OPERATION_MAPING` (
|
|
|
|
|
-- Table `MBL_OPERATION_PROPERTY`
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `MBL_OPERATION_PROPERTY` (
|
|
|
|
|
`OPERATION_PROPERTY_ID` INT NOT NULL AUTO_INCREMENT ,
|
|
|
|
|
`OPERATION_ID` INT NULL ,
|
|
|
|
|
`PROPERTY_ID` INT NULL ,
|
|
|
|
|
`OPERATION_ID` INT NOT NULL ,
|
|
|
|
|
`PROPERTY` VARCHAR(45) NOT NULL ,
|
|
|
|
|
`VALUE` TEXT NULL ,
|
|
|
|
|
PRIMARY KEY (`OPERATION_PROPERTY_ID`) ,
|
|
|
|
|
PRIMARY KEY (`OPERATION_ID`, `PROPERTY`) ,
|
|
|
|
|
CONSTRAINT `fk_MBL_OPERATION_PROPERTY_MBL_OPERATION1`
|
|
|
|
|
FOREIGN KEY (`OPERATION_ID` )
|
|
|
|
|
REFERENCES `MBL_OPERATION` (`OPERATION_ID` )
|
|
|
|
@ -76,13 +72,11 @@ CREATE TABLE IF NOT EXISTS `MBL_OPERATION_PROPERTY` (
|
|
|
|
|
-- Table `MBL_FEATURE_PROPERTY`
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `MBL_FEATURE_PROPERTY` (
|
|
|
|
|
`PROPERTY_ID` INT NOT NULL AUTO_INCREMENT ,
|
|
|
|
|
`PROPERTY` VARCHAR(100) NULL ,
|
|
|
|
|
`FEATURE_ID` VARCHAR(45) NULL ,
|
|
|
|
|
PRIMARY KEY (`PROPERTY_ID`) ,
|
|
|
|
|
`PROPERTY` VARCHAR(45) NOT NULL ,
|
|
|
|
|
`FEATURE_ID` VARCHAR(45) 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);
|
|
|
|
|
|
|
|
|
|