Back

I'm migrating from Firebase Firestore to Appwrite DB but there an error with a value of attribute

  • 0
  • Databases
  • React Native
  • General
  • Cloud
Ahmed CODE
25 Jun, 2024, 17:20

I'm getting an error with all documents in my Firestore db that a value must be an integer, I made a function that check all my docs attribute value if it's integer or not, and all of them are integer.

more informations about the error:

TypeScript
"errors": [
    "Error occurred while pushing 'databases:1031996536973963274' to destination with message: 'Invalid document structure: Attribute \"cr_idCounter\" has invalid format. Value must be a valid integer'",
    "Error occurred while pushing 'databases:1052861398058815549' to destination with message: 'Invalid document structure: Attribute \"cr_idCounter\" has invalid format. Value must be a valid integer'",
    "Error occurred while pushing 'databases:1056184177495650364' to destination with message: 'Invalid document structure: Attribute \"cr_idCounter\" has invalid format. Value must be a valid integer'",
    "Error occurred while pushing 'databases:1067815151354519633' to destination with message: 'Invalid document structure: Attribute \"cr_idCounter\" has invalid format. Value must be a valid integer'",

and a lot of errors but it change the id of the document and this is a photo for one of my documents content the value of my attribute.

TL;DR
Developers are encountering an error while migrating from Firebase Firestore to Appwrite DB, where the attribute value must be an integer but is showing an error. Despite verifying that the attribute values are integers, the issue persists. The error message specifies that the "cr_idCounter" attribute has an invalid format and must be a valid integer. Possible Solution: - Double-check attribute value formatting to ensure it matches the expected integer type. - Consider any data type conversions needed during migration to align with Appwrite DB requirements. - Verify that the data structure in Appwrite DB matches the expected format for integer attributes.
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