mysql data geofences cleaning

jabbadabbadahat3 years ago

hello I made a mess trying to bulk add geofences and now i need to start over I want to clear all data in tables connected with geofencing tell me please if i missed some table to clear:

tc_device_geofence
tc_geofences
tc_group_geofence
tc_user_geofence

Anton Tananaev3 years ago

Search all tables that have geofence in the name. That should be it.

It would also probably make sense to remove all events that reference removed geofences, if there are any.

jabbadabbadahat3 years ago

worked perfectly :) thanks

FK42 years ago

Would it be advisable to address DB directly, in case I had to remove selected geofence id's? API accepts only one

DELETE api/geofences/{id}
Anton Tananaev2 years ago

I would not recommend it, but if you need to do it one off and remove a really large number of geofences, then it's probably ok.

FK42 years ago

Thanks for the prompt response, it's a daily cleanup, less than 100 (for now), so I'd rather stick with the 100 API calls. I'll try to get more familiarized with your code and try to suggest a bulk delete option for the API

Thanks again!