forked from community/device-mgt-plugins
Merge branch 'master' of https://github.com/geethkokila/product-cdm
commit
9004f2cd36
@ -1,11 +1,88 @@
|
|||||||
CREATE TABLE IF NOT EXISTS MBL_DEVICE
|
|
||||||
(
|
-- -----------------------------------------------------
|
||||||
MOBILE_DEVICE_ID VARCHAR(45) NOT NULL,
|
-- Table `MBL_DEVICE`
|
||||||
REG_ID VARCHAR(45) NOT NULL,
|
-- -----------------------------------------------------
|
||||||
IMEI VARCHAR(45) NOT NULL,
|
CREATE TABLE IF NOT EXISTS `MBL_DEVICE` (
|
||||||
IMSI VARCHAR(45),
|
`MOBILE_DEVICE_ID` VARCHAR(45) NOT NULL ,
|
||||||
OS_VERSION VARCHAR(45) NOT NULL,
|
`REG_ID` VARCHAR(45) NULL DEFAULT NULL ,
|
||||||
DEVICE_MODEL VARCHAR(45) NOT NULL,
|
`IMEI` VARCHAR(45) NULL DEFAULT NULL ,
|
||||||
VENDOR VARCHAR(45) NOT NULL,
|
`IMSI` VARCHAR(45) NULL DEFAULT NULL ,
|
||||||
PRIMARY KEY (MOBILE_DEVICE_ID)
|
`OS_VERSION` VARCHAR(45) NULL DEFAULT NULL ,
|
||||||
);
|
`DEVICE_MODEL` VARCHAR(45) NULL DEFAULT NULL ,
|
||||||
|
`VENDOR` 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) NULL ,
|
||||||
|
`NAME` VARCHAR(100) NULL ,
|
||||||
|
`DESCRIPTION` VARCHAR(200) 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) 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);
|
||||||
|
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
-- Table `MBL_DEVICE_OPERATION_MAPING`
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
CREATE TABLE IF NOT EXISTS `MBL_DEVICE_OPERATION_MAPING` (
|
||||||
|
`DEVICE_ID` VARCHAR(45) NOT NULL ,
|
||||||
|
`OPERATION_ID` INT NOT NULL ,
|
||||||
|
`SENT_DATE` INT NULL ,
|
||||||
|
`RECEIVED_DATE` INT 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_PROPERTY_ID` INT NOT NULL AUTO_INCREMENT ,
|
||||||
|
`OPERATION_ID` INT NULL ,
|
||||||
|
`PROPERTY_ID` INT NULL ,
|
||||||
|
`VALUE` TEXT NULL ,
|
||||||
|
PRIMARY KEY (`OPERATION_PROPERTY_ID`) ,
|
||||||
|
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_ID` INT NOT NULL AUTO_INCREMENT ,
|
||||||
|
`PROPERTY` VARCHAR(100) NULL ,
|
||||||
|
`FEATURE_ID` VARCHAR(45) NULL ,
|
||||||
|
PRIMARY KEY (`PROPERTY_ID`) ,
|
||||||
|
CONSTRAINT `fk_MBL_FEATURE_PROPERTY_MBL_FEATURE1`
|
||||||
|
FOREIGN KEY (`FEATURE_ID` )
|
||||||
|
REFERENCES `MBL_FEATURE` (`FEATURE_ID` )
|
||||||
|
ON DELETE NO ACTION
|
||||||
|
ON UPDATE NO ACTION);
|
||||||
|
|
||||||
|
@ -0,0 +1,88 @@
|
|||||||
|
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
-- Table `MBL_DEVICE`
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
CREATE TABLE IF NOT EXISTS `MBL_DEVICE` (
|
||||||
|
`MOBILE_DEVICE_ID` VARCHAR(45) NOT NULL ,
|
||||||
|
`REG_ID` 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 ,
|
||||||
|
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) NULL ,
|
||||||
|
`NAME` VARCHAR(100) NULL ,
|
||||||
|
`DESCRIPTION` VARCHAR(200) 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) 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);
|
||||||
|
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
-- Table `MBL_DEVICE_OPERATION_MAPING`
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
CREATE TABLE IF NOT EXISTS `MBL_DEVICE_OPERATION_MAPING` (
|
||||||
|
`DEVICE_ID` VARCHAR(45) NOT NULL ,
|
||||||
|
`OPERATION_ID` INT NOT NULL ,
|
||||||
|
`SENT_DATE` INT NULL ,
|
||||||
|
`RECEIVED_DATE` INT 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_PROPERTY_ID` INT NOT NULL AUTO_INCREMENT ,
|
||||||
|
`OPERATION_ID` INT NULL ,
|
||||||
|
`PROPERTY_ID` INT NULL ,
|
||||||
|
`VALUE` TEXT NULL ,
|
||||||
|
PRIMARY KEY (`OPERATION_PROPERTY_ID`) ,
|
||||||
|
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_ID` INT NOT NULL AUTO_INCREMENT ,
|
||||||
|
`PROPERTY` VARCHAR(100) NULL ,
|
||||||
|
`FEATURE_ID` VARCHAR(45) NULL ,
|
||||||
|
PRIMARY KEY (`PROPERTY_ID`) ,
|
||||||
|
CONSTRAINT `fk_MBL_FEATURE_PROPERTY_MBL_FEATURE1`
|
||||||
|
FOREIGN KEY (`FEATURE_ID` )
|
||||||
|
REFERENCES `MBL_FEATURE` (`FEATURE_ID` )
|
||||||
|
ON DELETE NO ACTION
|
||||||
|
ON UPDATE NO ACTION);
|
||||||
|
|
@ -0,0 +1,15 @@
|
|||||||
|
-- -----------------------------------------------------
|
||||||
|
-- Table `MBL_DEVICE`
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
CREATE TABLE IF NOT EXISTS `MBL_DEVICE` (
|
||||||
|
`MOBILE_DEVICE_ID` VARCHAR(45) NOT NULL,
|
||||||
|
`REG_ID` VARCHAR(45) NULL,
|
||||||
|
`IMEI` VARCHAR(45) NULL,
|
||||||
|
`IMSI` VARCHAR(45) NULL,
|
||||||
|
`OS_VERSION` VARCHAR(45) NULL,
|
||||||
|
`DEVICE_MODEL` VARCHAR(45) NULL,
|
||||||
|
`VENDOR` VARCHAR(45) NULL,
|
||||||
|
PRIMARY KEY (`MOBILE_DEVICE_ID`))
|
||||||
|
ENGINE = InnoDB;
|
||||||
|
|
||||||
|
|
Loading…
Reference in new issue