odk-x / tool-suite-X

ODK-X Tool Suite Project roadmaps, issue queue, release notes and wiki.
https://www.odk-x.org
Apache License 2.0
25 stars 41 forks source link

Check before deleting tables on tablet when syncing #120

Open elmps2018 opened 4 years ago

elmps2018 commented 4 years ago

When pre-piloting our survey, we had not set up a server. We were just planning on collecting data on survey and tables and exporting from tables. In the process of the pre-pilot staff learning to export, she accidentally sync'd to the demo server instead and it deleted all the pre-pilot data. Suggest adding a setting so that when you click sync now and have entirely different tables on the tablets, some warning message appears, rather than just deleting all the data.

wbrunette commented 4 years ago

@elmps2018 the sync protocol will fail if the tables are entirely different. I believe this can happen when you have the exact same tables just with different data present in the tables. The sync will make it look like the server's table. This is a case to consider especially when people partition regions doing the same data campaign. Please clarify further if my clarification is incorrect.

elmps2018 commented 4 years ago

The tables were entirely different (ones we pushed to the tablet were definitely different than geotagger on the demo server) and the sync went through and deleted everything. I replicated this earlier today after the fieldworker described what happened. We did get them on the tablet by pushing rather than syncing, since this was for pre-pilot.

wbrunette commented 4 years ago

Thanks. This is why I was working towards a distinction. Anything is possible with the "push" vs the "sync". I am not sure how to guard against the "push" since we expect the behavior to be be destroy everything.

elmps2018 commented 4 years ago

Note, though, it wasn't the push that ate data, though, it was the erroneous sync to the demo server after the push (and some data entry).