Skip to content
Back

Migration fails

  • 0
  • Self Hosted
  • General
  • Cloud
Showdey
15 Apr, 2025, 17:28

Hi! I'm getting no response on appwrite's support so I'm writing a post here. I was trying to migrate self-hosted to cloud but instead I'm getting a lot of errors regarding existing data and indexes.

TypeScript
"Error occurred while fetching 'index:' from source with message: 'Utopia\\Migration\\Resources\\Database\\Index::__construct(): Argument #8 ($createdAt) must be of type string, null given, called in /usr/src/code/vendor/utopia-php/migration/src/Migration/Sources/Appwrite.php on line 916' Message: Utopia\\Migration\\Resources\\Database\\Index::__construct(): Argument #8 ($createdAt) must be of type string, null given, called in /usr/src/code/vendor/utopia-php/migration/src/Migration/Sources/Appwrite.php on line 916 File: /usr/src/code/vendor/utopia-php/migration/src/Migration/Resources/Database/Index.php Line: 27",
    "Error occurred while pushing 'database:properties' to destination with message: 'Document already exists' Message: Document already exists File: /usr/src/code/vendor/utopia-php/database/src/Database/Adapter/MariaDB.php Line: 2362",
    "Error occurred while pushing 'database:library' to destination with message: 'Document already exists' Message: Document already exists File: /usr/src/code/vendor/utopia-php/database/src/Database/Adapter/MariaDB.php Line: 2362",```


And then about 50 of them. I had many other projects I wanted to migrate in wich I REMOVED indexes and created them when the project had transferred successfully but *NO RELATIONS WERE TRANSFERRED*!

Is it normal with migrations? Or is my instance just broken
TL;DR
Developers are experiencing errors while trying to migrate from self-hosted to cloud due to data and index conflicts. The issue seems to be related to index creation and document duplication errors. One potential solution could be to remove indexes before migration and recreate them after successful transfer to avoid conflicts. Additionally, it seems that relations are not being transferred during the migration process.
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