Back

Firestore Migration

  • 0
  • Databases
Said H
14 Feb, 2023, 12:18

Anyone has any recommendation to migrate Firestore data to AppWrite?

TL;DR
The user is asking for recommendations on how to migrate Firestore data to AppWrite. One solution is to use a script provided in a GitHub gist, but it may be more suitable for ad-hoc queries. Another suggestion is to update the data directly in the MariaDB database. The user also asked about updating system fields in AppWrite programmatically, and it seems there is no way to do so. The user then mentions they wrote a script to extract data from Firestore and insert it into AppWrite because Firestore requires a paid plan which they cannot use. There is a community-built tool called data-migrator on GitHub that might be helpful.
Eldad
14 Feb, 2023, 13:06
Eldad
14 Feb, 2023, 13:09

You have https://github.com/tannermeade/data-migrator built by a community member.

We're also working on a built-in capability to help you migrate from Firebase to Appwrite directly from the Appwrite console.

@bradleySchofield is working on that and can provide advice if you're struggling with Firebase APIs which makes it hard on purpose to migrate some things.

Said H
14 Feb, 2023, 14:28

Thanks so much. Let me study these first.

Eldad
14 Feb, 2023, 14:31

Let us know how it worked for you, any feedback would help while we design and build this feature.

Said H
14 Feb, 2023, 15:24

I will let you know how it goes with my migration. Thanks so much

Eldad
14 Feb, 2023, 15:25

Thanks, anytime

Said H
14 Feb, 2023, 22:58

hey, i ended up writing a script to extract from Firestore, and insert to AppWrite because Firestore needs at least the Blaze plan to export out the data, and Firestore is rejecting my payment method from my country (idk why).

Said H
14 Feb, 2023, 22:59

the only issue i encounter is updating $createdAt and $updatedAt. There is no way for me to update these system fields in AppWrite programmatically right?

Drake
14 Feb, 2023, 23:04

Correct, the API does not allow modifying that.

You could try to go directly to the database

Said H
14 Feb, 2023, 23:13

thanks Steven. You meant updating in the console > database? I just tried it but it is not editable. Or is it something else?

Drake
14 Feb, 2023, 23:25

i meant directly in the mariadb database

Said H
14 Feb, 2023, 23:26

oh, okay, i dont know yet how to access it to update. let me try to learn how. Thanks for letting me know

Drake
14 Feb, 2023, 23:42

You can use this script: https://gist.github.com/stnguyen90/ffe40b7fe85985fc80f6bc9e0d430b3d. but this is kind of just for ad-hoc queries. for more extensive stuff it might be good to publish the mariadb port and then connect to it with a script that will update all the rows

Said H
14 Feb, 2023, 23:43

Thanks a lot Steven. I will explore this

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more