Firestore schema versioning and backward compatibility with android app to prevent crashes : <p>Firestore a NOSQL is a Document oriented database. Now how to manage versioning of the data as I use it with Firebase SDK and Android applications?</p>

<p>For e.g. let's say I have a JSON schema that I launch with my 1.0.0version of my android app. Later 1.0.1 comes up where I have to add some extra fields for the newer documents. Since I changed the structure to have additional information, it only applies to new documents.</p>

<p>Therefore, using this logic, I can see my Android application must be able to deal with all versions of JSON tree if used against this project I create in the firebase console with Firestore. But this can be very painful right, that I have carry the deadweight of backward compatibility endlessly? Is there a way to have some sort of version like in protobuf or something the android app can send to firestore server side so that automatically we can do something to prevent crashes on the android app when it sees new fields? </p>

<p>See also this thread, the kind of problem the engineer has posted. You can end up with this kind of problem as new fields get discovered in your JSON tree by the android app
<a href="https://stackoverflow.com/questions/49235874/add-new-field-or-change-the-structure-on-all-firestore-documents">Add new field or change the structure on all Firestore documents</a></p>

<p>Any suggestions for how we should go about this?</p>

<p>In node.js architecture we handle this with default-> v1.1/update or 
default-> v1.0/update, that way we can manage the routes.</p>

<p>But for android+firebase SKD-> talking to Firestore NOSQL, how do I manage the versioning of the json schema. </p>
