mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
fix: update upgrade migration to create missing attributes
Between version 1.6.0 and 1.6.1, the migrations collection was updated to include a destination attribute and the databases collection was updated to include an originalId attribute. However, the upgrade migration was not updated to create these attributes. This PR updates the migration to create the missing attributes.
This commit is contained in:
@@ -82,6 +82,14 @@ class V21 extends Migration
|
||||
Console::warning("'type' from {$id}: {$th->getMessage()}");
|
||||
}
|
||||
break;
|
||||
case 'migrations':
|
||||
// Create destination attribute
|
||||
try {
|
||||
$this->createAttributeFromCollection($this->projectDB, $id, 'destination');
|
||||
} catch (Throwable $th) {
|
||||
Console::warning("'destination' from {$id}: {$th->getMessage()}");
|
||||
}
|
||||
break;
|
||||
case 'schedules':
|
||||
// Create data attribute
|
||||
try {
|
||||
@@ -91,7 +99,14 @@ class V21 extends Migration
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'databases':
|
||||
// Create originalId attribute
|
||||
try {
|
||||
$this->createAttributeFromCollection($this->projectDB, $id, 'originalId');
|
||||
} catch (Throwable $th) {
|
||||
Console::warning("'originalId' from {$id}: {$th->getMessage()}");
|
||||
}
|
||||
break;
|
||||
case 'functions':
|
||||
// Create scopes attribute
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user