|
|
@ -2,8 +2,8 @@
|
|
|
|
-- Table `DM_DEVICE_TYPE`
|
|
|
|
-- Table `DM_DEVICE_TYPE`
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
CREATE TABLE IF NOT EXISTS `DM_DEVICE_TYPE` (
|
|
|
|
CREATE TABLE IF NOT EXISTS `DM_DEVICE_TYPE` (
|
|
|
|
`ID` INT(11) NOT NULL ,
|
|
|
|
`ID` INT(11) NOT NULL AUTO_INCREMENT,
|
|
|
|
`NAME` VARCHAR(300) DEFAULT NULL ,
|
|
|
|
`NAME` VARCHAR(300) NOT NULL ,
|
|
|
|
PRIMARY KEY (`ID`) )
|
|
|
|
PRIMARY KEY (`ID`) )
|
|
|
|
ENGINE = InnoDB
|
|
|
|
ENGINE = InnoDB
|
|
|
|
DEFAULT CHARACTER SET = latin1;
|
|
|
|
DEFAULT CHARACTER SET = latin1;
|
|
|
@ -13,12 +13,12 @@ DEFAULT CHARACTER SET = latin1;
|
|
|
|
-- Table `DM_DEVICE`
|
|
|
|
-- Table `DM_DEVICE`
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
CREATE TABLE IF NOT EXISTS `DM_DEVICE` (
|
|
|
|
CREATE TABLE IF NOT EXISTS `DM_DEVICE` (
|
|
|
|
`ID` VARCHAR(20) NOT NULL ,
|
|
|
|
`ID` VARCHAR(20) NOT NULL AUTO_INCREMENT ,
|
|
|
|
`DESCRIPTION` TEXT DEFAULT NULL ,
|
|
|
|
`DESCRIPTION` TEXT DEFAULT NULL ,
|
|
|
|
`NAME` VARCHAR(100) DEFAULT NULL ,
|
|
|
|
`NAME` VARCHAR(100) NOT NULL ,
|
|
|
|
`DEVICE_TYPE_ID` INT(11) DEFAULT NULL ,
|
|
|
|
`DEVICE_TYPE_ID` INT(11) NOT NULL ,
|
|
|
|
`DEVICE_IDENTIFICATION` VARCHAR(300) DEFAULT NULL ,
|
|
|
|
`DEVICE_IDENTIFICATION` VARCHAR(300) NOT NULL ,
|
|
|
|
`TENANT_ID` INTEGER DEFAULT 0,
|
|
|
|
`TENANT_ID` INTEGER NOT NULL,
|
|
|
|
PRIMARY KEY (`ID`) ,
|
|
|
|
PRIMARY KEY (`ID`) ,
|
|
|
|
INDEX `fk_DM_DEVICE_DM_DEVICE_TYPE2_idx` (`DEVICE_TYPE_ID` ASC) ,
|
|
|
|
INDEX `fk_DM_DEVICE_DM_DEVICE_TYPE2_idx` (`DEVICE_TYPE_ID` ASC) ,
|
|
|
|
CONSTRAINT `fk_DM_DEVICE_DM_DEVICE_TYPE2`
|
|
|
|
CONSTRAINT `fk_DM_DEVICE_DM_DEVICE_TYPE2`
|
|
|
|