|
|
|
@ -145,7 +145,7 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_STATUS (
|
|
|
|
|
CONSTRAINT FK_DM_DEVICE_STATUS_DEVICE FOREIGN KEY (DEVICE_ID) REFERENCES
|
|
|
|
|
DM_DEVICE (ID) ON DELETE NO ACTION ON UPDATE NO ACTION,
|
|
|
|
|
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;
|
|
|
|
|
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);
|
|
|
|
|