ICTatRTI / coconut-analytics

Browserified & backboned version of coconut-reports
Other
2 stars 3 forks source link

Dhis2 doc on couchdb fields erased #306

Open scloo opened 7 years ago

scloo commented 7 years ago

Each time we push changes to the couchdb server, I noticed the dhis2 document in coconut-surveillance-zanzibar gets reset to basics. Any data that was previously saved to this doc, from Analytics, is gone. Including the filed "isApplicationDoc".

scloo commented 7 years ago

The cause of problem is that the file _docs/dhis2.json was not updated and did not contain those fields/attributes. So each time codes are pushed to the server, this file will overwrite whatever is on the database.

I have added those fields to the _docs/dhis2.json.

@mikeymckay However this will still have another problem. Since Analytics will update the dhis2 doc on the database. Each time we push any new codes to the server, whatever new data entered in the admin/dhis2 will disappear. So this is not a good solution to push the dhis2.json file to the server each time new codes are deployed.

mikeymckay commented 7 years ago

I've been keeping files like this in a folder called _docs_static_push_as_needed. It's for things that are needed during an initial deploy, but are often changed by the user later. Not a super elegant solution, but it works. In other words, let's move it out of _docs, but keep it somewhere in git.