Fix test failure

corrective-policy
Pahansith 4 years ago
parent efe116d87e
commit a401c9d91d

@ -649,15 +649,15 @@ ORDER BY TENANT_ID, DEVICE_ID;
-- END OF DASHBOARD RELATED VIEWS -- -- END OF DASHBOARD RELATED VIEWS --
-- GEOFENCE RELATED DATA -- -- DM_GEOFENCE TABLE--
CREATE TABLE IF NOT EXISTS DM_GEOFENCE ( CREATE TABLE IF NOT EXISTS DM_GEOFENCE (
ID INT NOT NULL AUTO_INCREMENT, ID INT NOT NULL AUTO_INCREMENT,
FENCE_NAME VARCHAR(100) NOT NULL, FENCE_NAME VARCHAR(255) NOT NULL,
DESCRIPTION TEXT DEFAULT NULL, DESCRIPTION TEXT DEFAULT NULL,
LATITUDE DOUBLE NULL, LATITUDE DOUBLE DEFAULT NULL,
LONGITUDE DOUBLE NULL, LONGITUDE DOUBLE DEFAULT NULL,
RADIUS DOUBLE NULL, RADIUS DOUBLE DEFAULT NULL,
GEO_JSON TEXT DEFAULT NULL, GEO_JSON TEXT DEFAULT NULL,
FENCE_SHAPE VARCHAR(100) DEFAULT NULL, FENCE_SHAPE VARCHAR(100) DEFAULT NULL,
CREATED_TIMESTAMP TIMESTAMP NOT NULL, CREATED_TIMESTAMP TIMESTAMP NOT NULL,
@ -666,7 +666,7 @@ CREATE TABLE IF NOT EXISTS DM_GEOFENCE (
PRIMARY KEY (ID) PRIMARY KEY (ID)
); );
-- END OF GEOFENCE RELATED DATA -- -- END OF DM_GEOFENCE TABLE--
-- DM_GEOFENCE_GROUP_MAPPING TABLE-- -- DM_GEOFENCE_GROUP_MAPPING TABLE--
CREATE TABLE IF NOT EXISTS DM_GEOFENCE_GROUP_MAPPING ( CREATE TABLE IF NOT EXISTS DM_GEOFENCE_GROUP_MAPPING (
@ -678,7 +678,7 @@ CREATE TABLE IF NOT EXISTS DM_GEOFENCE_GROUP_MAPPING (
DM_GEOFENCE (ID) ON DELETE NO ACTION ON UPDATE NO ACTION, DM_GEOFENCE (ID) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT fk_dm_geofence_group_mapping_group FOREIGN KEY (GROUP_ID) REFERENCES CONSTRAINT fk_dm_geofence_group_mapping_group FOREIGN KEY (GROUP_ID) REFERENCES
DM_GROUP (ID) ON DELETE NO ACTION ON UPDATE NO ACTION DM_GROUP (ID) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB; );
-- END OF DM_GEOFENCE_GROUP_MAPPING TABLE-- -- END OF DM_GEOFENCE_GROUP_MAPPING TABLE--
@ -692,7 +692,7 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_EVENT (
CREATED_TIMESTAMP TIMESTAMP NOT NULL, CREATED_TIMESTAMP TIMESTAMP NOT NULL,
TENANT_ID INTEGER DEFAULT 0, TENANT_ID INTEGER DEFAULT 0,
PRIMARY KEY (ID) PRIMARY KEY (ID)
) ENGINE=InnoDB; );
-- END OF DM_DEVICE_EVENT TABLE -- -- END OF DM_DEVICE_EVENT TABLE --
@ -706,6 +706,20 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_EVENT_GROUP_MAPPING (
DM_DEVICE_EVENT (ID) ON DELETE NO ACTION ON UPDATE NO ACTION, DM_DEVICE_EVENT (ID) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT fk_dm_event_group_mapping_group FOREIGN KEY (GROUP_ID) REFERENCES CONSTRAINT fk_dm_event_group_mapping_group FOREIGN KEY (GROUP_ID) REFERENCES
DM_GROUP (ID) ON DELETE NO ACTION ON UPDATE NO ACTION DM_GROUP (ID) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB; );
-- END OF DM_DEVICE_EVENT_GROUP_MAPPING TABLE--
-- DM_GEOFENCE_GROUP_MAPPING TABLE--
CREATE TABLE IF NOT EXISTS DM_GEOFENCE_EVENT_MAPPING (
ID INT NOT NULL AUTO_INCREMENT,
FENCE_ID INT NOT NULL,
EVENT_ID INT NOT NULL,
PRIMARY KEY (ID),
CONSTRAINT fk_dm_geofence_event_mapping_geofence FOREIGN KEY (FENCE_ID) REFERENCES
DM_GEOFENCE (ID) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT fk_dm_geofence_event_mapping_event FOREIGN KEY (EVENT_ID) REFERENCES
DM_DEVICE_EVENT (ID) ON DELETE NO ACTION ON UPDATE NO ACTION
);
-- END OF DM_DEVICE_EVENT_GROUP_MAPPING TABLE-- -- END OF DM_GEOFENCE_GROUP_MAPPING TABLE--
Loading…
Cancel
Save