Back

Appwrite Documents Migration fails because of relationships.

  • 0
  • Self Hosted
  • Databases
  • Cloud
Tomic R.
13 May, 2024, 08:42

I am currently trying to migrate my Appwrite project from Self-hosted (DigitalOcean) to Appwrite Cloud. I started a migration a few days ago with literally everything: users, functions, storage and database.

Users and storage went perfect. Functions it at least created the functions, I just have to deploy them again manually (no problem for me, it’s only 5 functions, that’s not the big issue I’m facing). And for the databases, it did create all the collections and attributes. But the documents are always causing an error, especially the relationships. I’ve tried migration multiple times, also creating a new project, but the documents are never migrated.

Interestingly: Even if I can see the attributes, in the migrations tab, the attributes are stuck at loading.

For the documents, it shows an error with the relationships. But on the original instance, the self-hosted instance, the relationships work perfectly. No exception. But because of some reason it still does not want to migrate.

Logs in next message.

TL;DR
Developers are facing issues migrating Appwrite documents due to relationship errors. The migration process fails consistently despite multiple attempts, with errors specifically related to relationships. Attributes appear to be stuck at loading, and the error message indicates an issue with invalid relationship values. The original self-hosted instance does not encounter relationship problems. Solution: Investigate the migration process for a potential glitch handling relationships and attempt the migration again. Double-check the configuration or seek support from Appwrite for further assistance.
Tomic R.
13 May, 2024, 08:42

In the dashboard, it does how an error icon and also an error:

TypeScript
{
  "status": "failed",
  "stage": "finished",
  "source": "Appwrite",
  "resources": [
    "database",
    "collection",
    "attribute",
    "index",
    "document"
  ],
  "statusCounters": {
    "database": {

    },
    "collection": {

    },
    "attribute": {
      "pending": 5, // Not actually pending
      "success": 33,
      "error": 0,
      "skip": 0,
      "processing": 0,
      "warning": 0
    },
    "index": {

    },
    "document": {
      "pending": 0,
      "success": 0,
      "error": 53,
      "skip": 0,
      "processing": 0,
      "warning": 0
    }
  },
  "resourceData": [],
  "errors": [
    "Error occurred while pushing 'databases:64e22c70ce62a1fa46d0' to destination with message: 'Invalid relationship value. Must be either a document ID or a document, array given.'",
    "Error occurred while pushing 'databases:650476c99b68a0b5fce0' to destination with message: 'Invalid relationship value. Must be either a document ID or a document, array given.'",
    "Error occurred while pushing 'databases:652e895addcba3cba720' to destination with message: 'Invalid relationship value. Must be either a document ID or a document, array given.'",
    "Error occurred while pushing 'databases:6532627fcedd3c105a5e' to destination with message: 'Invalid relationship value. Must be either a document ID or a document, array given.'",
    "Error occurred while pushing 'databases:653666a39b168dd628e1' to destination with message: 'Invalid relationship value. Must be either a document ID or a document, array given.'",
  ]
}
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