Configuring device management related schemas to be copied to dbscripts directory during the feature installation
parent
9b57455bcc
commit
3c425ab0eb
@ -0,0 +1,26 @@
|
||||
CREATE TABLE IF NOT EXISTS DM_DEVICE_TYPE
|
||||
(
|
||||
ID INT(11) auto_increment NOT NULL,
|
||||
NAME VARCHAR(300) NULL DEFAULT NULL,
|
||||
PRIMARY KEY (ID)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS DM_DEVICE
|
||||
(
|
||||
ID INT auto_increment NOT NULL,
|
||||
DESCRIPTION TEXT NULL DEFAULT NULL,
|
||||
NAME VARCHAR(100) NULL DEFAULT NULL,
|
||||
DATE_OF_ENROLLMENT BIGINT NULL DEFAULT NULL,
|
||||
DATE_OF_LAST_UPDATE BIGINT NULL DEFAULT NULL,
|
||||
OWNERSHIP VARCHAR(45) NULL DEFAULT NULL,
|
||||
STATUS VARCHAR(15) NULL DEFAULT NULL,
|
||||
DEVICE_TYPE_ID INT(11) NULL DEFAULT NULL,
|
||||
DEVICE_IDENTIFICATION VARCHAR(300) NULL DEFAULT NULL,
|
||||
OWNER VARCHAR(45) NULL DEFAULT NULL,
|
||||
TENANT_ID INTEGER DEFAULT 0,
|
||||
PRIMARY KEY (ID),
|
||||
CONSTRAINT fk_DM_DEVICE_DM_DEVICE_TYPE2 FOREIGN KEY (DEVICE_TYPE_ID )
|
||||
REFERENCES DM_DEVICE_TYPE (ID ) ON DELETE NO ACTION ON UPDATE NO ACTION
|
||||
);
|
||||
-- TO:DO - Remove this INSERT sql statement.
|
||||
Insert into DM_DEVICE_TYPE (ID,NAME) VALUES (1, 'android');
|
@ -0,0 +1,35 @@
|
||||
-- -----------------------------------------------------
|
||||
-- Table `DM_DEVICE_TYPE`
|
||||
-- -----------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `DM_DEVICE_TYPE` (
|
||||
`ID` INT(11) NOT NULL ,
|
||||
`NAME` VARCHAR(300) NULL DEFAULT NULL ,
|
||||
PRIMARY KEY (`ID`) )
|
||||
ENGINE = InnoDB
|
||||
DEFAULT CHARACTER SET = latin1;
|
||||
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `DM_DEVICE`
|
||||
-- -----------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `DM_DEVICE` (
|
||||
`ID` VARCHAR(20) NOT NULL ,
|
||||
`DESCRIPTION` TEXT NULL DEFAULT NULL ,
|
||||
`NAME` VARCHAR(100) NULL DEFAULT NULL ,
|
||||
`DATE_OF_ENROLLMENT` DATETIME NULL DEFAULT NULL ,
|
||||
`DATE_OF_LAST_UPDATE` DATETIME NULL DEFAULT NULL ,
|
||||
`OWNERSHIP` VARCHAR(45) NULL DEFAULT NULL ,
|
||||
`STATUS` VARCHAR(15) NULL DEFAULT NULL ,
|
||||
`DEVICE_TYPE_ID` INT(11) NULL DEFAULT NULL ,
|
||||
`DEVICE_IDENTIFICATION` VARCHAR(300) NULL DEFAULT NULL ,
|
||||
`OWNER` VARCHAR(45) NULL DEFAULT NULL ,
|
||||
TENANT_ID INTEGER DEFAULT 0,
|
||||
PRIMARY KEY (`ID`) ,
|
||||
INDEX `fk_DM_DEVICE_DM_DEVICE_TYPE2_idx` (`DEVICE_TYPE_ID` ASC) ,
|
||||
CONSTRAINT `fk_DM_DEVICE_DM_DEVICE_TYPE2`
|
||||
FOREIGN KEY (`DEVICE_TYPE_ID` )
|
||||
REFERENCES `DM_DEVICE_TYPE` (`ID` )
|
||||
ON DELETE NO ACTION
|
||||
ON UPDATE NO ACTION)
|
||||
ENGINE = InnoDB
|
||||
DEFAULT CHARACTER SET = latin1;
|
@ -1,3 +1,3 @@
|
||||
instructions.configure = \
|
||||
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.server_${feature.version}/conf/cdm-config.xml,target:${installFolder}/../../conf/cdm-config.xml,overwrite:true);\
|
||||
|
||||
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.server_${feature.version}/dbscripts/cdm,target:${installFolder}/../../../dbscripts/cdm,overwrite:true);\
|
||||
|
Loading…
Reference in new issue