Coming from a SQL background, I'm wondering how does one go about doing database migration in firebase?
Assume I have the following data in firebase {dateFrom: 2015-11-11, timeFrom: 09:00} ....
and now the front-end client will store and expects data in the form {dateTimeFrom: 2015-011-11T09:00:00-07:00}
. How do I update firebase such that all dateFrom: xxxx
and timeFrom: yyyy
are removed and replaced with dateTimeFrom: xxxxyyyy
? Thanks.
From Firebase, you should be able to export existing data as JSON, and them import into MongoDB with mongoimport . The docs have some create tutorials and example apps to get you started.
You have to create your own script that reads, transform and write it back. You may eider read one node at the time or read the whole DB if it is not big. You may decide to leave the logic to your client when it access to it (if it ever does)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With