Just because your NoSql database doesn't have a schema in a traditional sense doesn't mean there is a logical schema you need to deal with as it changes. In the case of a typical app using MongoDb, most likely your code expects certain fields of the json object to behave in certain ways. If you change the behavior, it follows you might want to update the already existing data in the database. Now, with traditional RDBMS this was a largely solved problem -- you just had to ALTER the underlying tables. But with these newfangled NoSQL databases, you have a decision -- do you write a script to munge and update all your objects? Or do you add code to convert between versions on the fly? If so, how long do you support v1 objects? Forever? Until v3?
I'll add that the example used in the MongoDb blog post is a bit simplistic and a very easy case to handle if you've got a decent update process no matter what the RDBMS is; adding a field rarely hurts. It is when you decide to split your Name field into FirstName and LastName that things get exciting.
How can I update my firebase `schema` when for example, I've decided to split Name field into FirstName and LastName? Thanks.
--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/f6fbef7e-42a2-46ec-956b-9800cd7007b3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I think John was hoping for in-place schema migration tools, but we don't have anything like that. We don't have an explicit representation of schema at the storage level.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/CADypTEbjVFgsZ5T%3DmtEmVjQ7PXB6c1mmL5rdkS16Y1woiP5%3DPw%40mail.gmail.com.
https://www.youtube.com/watch?v=TgdFA72crHM&feature=youtu.be&t=21m45s also talks about database migration of NoSql databases.
In a basic scenario, suppose for example I wanted to rename a node in firebase. How would I do it in sync with the firebase app, assuming I have also updated it to use the new node name? In other words, when i run a `firebase deploy`, ideally, the node would be programmatically renamed and then the firebase app gets deployed.
Or simply put, how can I refactor the firebase db? Is there a way I can programmatically pull down all data, run my own scripts to update the json data and then programmatically overwrite the database with the updated json? Is this even a recommended approach?
Thanks. :)
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/da080277-f4fd-4d6f-83bc-b4f1971e16e8%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/d53066b6-90b6-4baf-9bf1-fa2e101b035d%40googlegroups.com.