|
|
|
@ -47,13 +47,14 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE (
|
|
|
|
|
)ENGINE = InnoDB;
|
|
|
|
|
|
|
|
|
|
CREATE INDEX IDX_DM_DEVICE ON DM_DEVICE(TENANT_ID, DEVICE_TYPE_ID);
|
|
|
|
|
CREATE INDEX IDX_DM_DEVICE_TYPE_ID_DEVICE_IDENTIFICATION ON DM_DEVICE(TENANT_ID, DEVICE_TYPE_ID,DEVICE_IDENTIFICATION);
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS DM_DEVICE_PROPERTIES (
|
|
|
|
|
DEVICE_TYPE_NAME VARCHAR(300) NOT NULL,
|
|
|
|
|
DEVICE_IDENTIFICATION VARCHAR(300) NOT NULL,
|
|
|
|
|
PROPERTY_NAME VARCHAR(100) DEFAULT 0,
|
|
|
|
|
PROPERTY_VALUE VARCHAR(100) DEFAULT NULL,
|
|
|
|
|
TENANT_ID VARCHAR(100) DEFAULT NULL,
|
|
|
|
|
TENANT_ID VARCHAR(100),
|
|
|
|
|
PRIMARY KEY (DEVICE_TYPE_NAME, DEVICE_IDENTIFICATION, PROPERTY_NAME, TENANT_ID)
|
|
|
|
|
)ENGINE = InnoDB;
|
|
|
|
|
|
|
|
|
@ -134,6 +135,7 @@ CREATE TABLE IF NOT EXISTS DM_ENROLMENT (
|
|
|
|
|
|
|
|
|
|
CREATE INDEX IDX_ENROLMENT_FK_DEVICE_ID ON DM_ENROLMENT(DEVICE_ID);
|
|
|
|
|
CREATE INDEX IDX_ENROLMENT_DEVICE_ID_TENANT_ID ON DM_ENROLMENT(DEVICE_ID, TENANT_ID);
|
|
|
|
|
CREATE INDEX IDX_ENROLMENT_DEVICE_ID_TENANT_ID_STATUS ON DM_ENROLMENT(DEVICE_ID, TENANT_ID, STATUS);
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS DM_ENROLMENT_OP_MAPPING (
|
|
|
|
|
ID INTEGER AUTO_INCREMENT NOT NULL,
|
|
|
|
@ -156,6 +158,7 @@ CREATE TABLE IF NOT EXISTS DM_ENROLMENT_OP_MAPPING (
|
|
|
|
|
CREATE INDEX IDX_ENROLMENT_OP_MAPPING ON DM_ENROLMENT_OP_MAPPING (UPDATED_TIMESTAMP);
|
|
|
|
|
CREATE INDEX IDX_EN_OP_MAPPING_EN_ID ON DM_ENROLMENT_OP_MAPPING(ENROLMENT_ID);
|
|
|
|
|
CREATE INDEX IDX_EN_OP_MAPPING_OP_ID ON DM_ENROLMENT_OP_MAPPING(OPERATION_ID);
|
|
|
|
|
CREATE INDEX IDX_EN_OP_MAPPING_EN_ID_STATUS ON DM_ENROLMENT_OP_MAPPING(ENROLMENT_ID, STATUS);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS DM_DEVICE_OPERATION_RESPONSE (
|
|
|
|
|