Rank 1: Thread
Hey everyone! 👋
I'm trying to upgrade my self-hosted Appwrite from 1.7.4 to 1.8.1 and the migration is consistently failing
Environment:
- Current version: 1.7.4
- Target version: 1.8.1
- Deployment: Self-hosted on Dokploy (modified docker-compose)
- Database: MariaDB 10.11
The Error:
Migration fails during document migration phase with:
Failed to migrate project with error: Collection not found
[Error] Type: Utopia\Database\Exception\NotFound
[Error] Message: Collection not found
[Error] File: /usr/src/code/vendor/utopia-php/database/src/Database/Database.php
[Error] Line: 7225
The error occurs in Migration.php(178) → V23.php(63) when trying to process the sites collection.
What I Found:
- ✅ Sites collection exists globally:
_8_sitestable present in MariaDB - ✅ Sites metadata is properly defined in
_8__metadata - ✅ The sites table is empty (0 records) - I never used the sites feature
- ✅ All other collections migrated successfully (databases, users, buckets, etc.)
- ❌ Migration script tries to iterate over project-level sites documents that don't exist
- ❌ Error happens in the
foreach('sites', ...)call
What Works:
- All my actual data (collections, documents, buckets) migrated successfully
- Rolling back to 1.7.4 works fine with the partially migrated database
- The only failure is on the sites collection (a new 1.8.x feature I never used)
Questions:
- Has anyone else hit this migrating from 1.7.4 → 1.8.1?
- Is there a workaround for the sites collection migration issue?
- Should I upgrade through intermediate versions (1.7.5, 1.8.0) if they exist?
- Is this a known bug that might be fixed in 1.8.2?
Attempted Solutions:
- Running migrate multiple times (same error every time)
- Manually updating version flag to 1.8.1 (caused additional internalId attribute errors)
- Verified sites collection exists and is properly defined, just the migration logic fails on empty collection
Any help appreciated!