|
|
@ -145,7 +145,7 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_STATUS (
|
|
|
|
CONSTRAINT FK_DM_DEVICE_STATUS_DEVICE FOREIGN KEY (DEVICE_ID) REFERENCES
|
|
|
|
CONSTRAINT FK_DM_DEVICE_STATUS_DEVICE FOREIGN KEY (DEVICE_ID) REFERENCES
|
|
|
|
DM_DEVICE (ID) ON DELETE NO ACTION ON UPDATE NO ACTION,
|
|
|
|
DM_DEVICE (ID) ON DELETE NO ACTION ON UPDATE NO ACTION,
|
|
|
|
CONSTRAINT FK_DM_DEVICE_STATUS_ENROLMENT FOREIGN KEY (ENROLMENT_ID) REFERENCES
|
|
|
|
CONSTRAINT FK_DM_DEVICE_STATUS_ENROLMENT FOREIGN KEY (ENROLMENT_ID) REFERENCES
|
|
|
|
DM_ENROLMENT (ID) ON DELETE NO ACTION ON UPDATE NO ACTION
|
|
|
|
DM_ENROLMENT (ID) ON DELETE CASCADE ON UPDATE CASCADE
|
|
|
|
)ENGINE = InnoDB;
|
|
|
|
)ENGINE = InnoDB;
|
|
|
|
CREATE INDEX IDX_ENROLMENT_FK_DEVICE_ID ON DM_ENROLMENT(DEVICE_ID);
|
|
|
|
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 ON DM_ENROLMENT(DEVICE_ID, TENANT_ID);
|
|
|
@ -840,4 +840,4 @@ CREATE TABLE IF NOT EXISTS DM_EXT_PERMISSION_MAPPING (
|
|
|
|
TRACCAR_DEVICE_ID INT DEFAULT 0,
|
|
|
|
TRACCAR_DEVICE_ID INT DEFAULT 0,
|
|
|
|
TRACCAR_USER_ID INT DEFAULT 0
|
|
|
|
TRACCAR_USER_ID INT DEFAULT 0
|
|
|
|
);
|
|
|
|
);
|
|
|
|
-- END OF DM_EXT_PERMISSION_MAPPING TABLE--
|
|
|
|
-- END OF DM_EXT_PERMISSION_MAPPING TABLE--
|
|
|
|