I am working on an application that will be cross-platform: web, android, iOS. I have a couple of objects that are designed to indicate some constants, such as real states. For instance:
{ "states": { "VALID": 0, "INVALID": 1 } }
Now I released clients who use this object, and they went into the wild, but I understand that this object does not meet my needs and needs to be changed. Right now I created an object with a version similar to this:
{ "states2": { "VALID": { "id": 0, "name": "Valid entry" }, "INVALID": { "id": 1, "name": "Invalid entry" } }
Currently, the plan is to leave the state object, and just get additional data from states2 in new clients, but it seems really scary to leave such a legacy cool around. So to the question:
1) Is there a way for version objects that Firebase provides?
or
2) I just use Firebase so that it is not used?
or
3) Is there a better way to structure this kind of read-only data in Firebase?
source share