Hi,
Currently migrating an old 1.3.4 version into 1.4.x, then 1.5.x.
During the 1.3.4 into 1.4, I had to run the migration multiple times to make it work.
I tried the same going from 1.4.x into latest 1.5.x, but I'm stuck when migrating Collections : Failed to update project ("xxx") version with error: Attribute not found
Is it possible to have a more verbose option of this log please ?
#Self hosted migration error from 1.3.x to latest 1.5.x : Attribute not found
30 messages · Page 1 of 1 (latest)
what version exactly are you trying to upgrade to?
Hi Steven 🙂 from 1.3.7 to 1.5.5 exactly
I'm not so sure if I should migrate patch by patch or minor by minor at this point 🤔
you said you went to 1.4.x 🧐
Indeed, I used the docker tag 1.4, which should point to the latest 1.4.x version, 1.4.14 if i remember correctly
I had to run the migration command 3 or 4 times to have a success
Then did the same with 1.5.x, without any luck
What 1.5.x version did you try to upgrade to exactly?
The last one 1.5.5
Hmmm I wonder if you have some orphaned/dead attributes...
That could be possible indeed
The only way to get more logs would be to modify the source code to output more
I'm pretty sure the error is happening here: https://github.com/appwrite/appwrite/blob/644704155a2491ccd2432c46ec4fa97989e48303/src/Appwrite/Migration/Version/V20.php#L109
So you'd need to exec into the container and modify that file. Then you can run the migrate command again
Hum, let me try this 
Could not update attribute in collection database_1_collection_, **customIds** of type **string**: Attribute not found
Weird...the collection id is missing...should this attribute exist?
You can also dig into the database directly too
Apart from this, it looks like its ok I guess
I'm not so sure at this point, I'll double check the client schema to make sure
I've protected the line you suggested though
try {
$this->projectDB->updateAttribute($collectionId, $attribute['key'], $attribute['type']);
} catch (Throwable $th) {
Console::warning("Could not update attribute in collection {$collectionId}, {$attribute['key']} of type {$attribute['type']}: {$th->getMessage()}");
}
Well, thank you ! It looks like it's ok, everything's back, with some warnings during migration 
Do you know by any chance a command which would check the database integrity, if any?
Well, you kind of skipped over all of these soooo if one of them really needed to be migrated, it'd be broken 😬
It's a mariadb container so you can use any method to get into a mariadb container
No I mean, something to know if the schema looks correct at this point
sadly yes
You have to dig into the tables
There's no 1 magic command