[SOLVED] : Migration Tool Fails with Fatal error: Uncaught Utopia\Database\Exception\Query:
- 0
- Self Hosted

from 1.5.3 to 1.5.4 getting following error, no idea about it.
docker compose exec appwrite migrate
Fatal error: Uncaught Utopia\Database\Exception\Query: Invalid query: Invalid cursor: UID must contain at most 36 char
5. Valid chars are a-z, A-Z, 0-9, and underscore. Can't start with a leading underscore in /usr/src/code/vendor/utopia
-php/database/src/Database/Database.php: 4694
Stack trace:
#0 /usr/src/code/src/Appwrite/Migration/Migration.php(221): Utopia\Database \Database->find(ObjectUtopia\Database\Docu
ment), Array)
#1 /usr/src/code/src/Appwrite/Migration/Migration.php(171): Appwrite Migration Migration->documentsIterator('cache')
#2 Linternal function]: Appwrite Migration Migration->Appwrite Migration/{closure}(Array, Array)
#3 {main}
thrown in /usr/src/code/vendor/utopia-php/database/src/Database/Database.php on line 4694

Restored from backup and live again but what is the possible reason for this migration, no idea.

You only need to migrate between major versions, you would just upgrade to go from 1.5.3 - 1.5.4


so i dont need to run migration tool. did i understand well, yea ?

here, in docs, it didnt mentioned about it..

No need, there's a little disclaimer up at the top of that page:

- all my previous minor updates, i run this command as well, something like from 1.4.13 to 1.4.14 ..

cool!

I did the migration and got same error, I was doing a minor upgrade, do I broke something now?


sometimes, migrations may be required between patch versions. Look at the GitHub release to know. For example, 1.5.5 says

awesome, thank you for that comment, what do you think that should we run migration-tool
when we need to upgrade minor/patch versions such as from 1.5.4 to 1.5.5 ? Because i run before but after @ Evan said, didnt run it again.

Look at the release notes

@D5

did you try that it works well ? because https://github.com/appwrite/appwrite/issues/7887#issuecomment-2079001646

That person may have deleted from the wrong cache table. There's one per project

Yea its done, and worked for me! This thread has been solved. Thank you for your support!

[SOLVED] : Migration Tool Fails with Fatal error: Uncaught Utopia\Database\Exception\Query:

@Steven I got this same fatal error running migration 1.5.4 -> 1.5.5 [SOLVED] - Deleted the caches and re-ran migration. I didn't need to restore a backup, just deleted cache and instantly re-ran migration.

i run migration tool again by upgrading from v.1.5.5
to v.1.5.6
but it fails again with the same error. Due to this comment, cleared cached again it works.

wth! this shouldn't be happening on new data!
Recommended threads
- Updating console to 1.8
Hey! Does anyone know how to update the appwrite console only? I am using console 1.7.4 but it has UI/UX issues 🙁
- Having errors migrating to cloud
Project will not migrate compeltely
- ENV vars not updating
When i do `nano .env` it shows `_APP_DOMAIN_TARGET=` as set to my domain, but when i do `docker compose exec appwrite vars` it shows `_APP_DOMAIN_TARGET=` as ...
