fix: migration
This commit is contained in:
parent
c3c6d00a9c
commit
c0649f7385
2 changed files with 5 additions and 6 deletions
|
@ -106,9 +106,7 @@ abstract class Migration
|
|||
if ($collection['$collection'] !== Database::METADATA) {
|
||||
continue;
|
||||
}
|
||||
if ($collection['$id'] === 'databases') {
|
||||
continue;
|
||||
}
|
||||
|
||||
$sum = 0;
|
||||
$nextDocument = null;
|
||||
$collectionCount = $this->projectDB->count($collection['$id']);
|
||||
|
|
|
@ -172,9 +172,6 @@ class V14 extends Migration
|
|||
$id = $collection->getId();
|
||||
$internalId = $collection->getInternalId();
|
||||
|
||||
if ($this->projectDB->exists(App::getEnv('_APP_DB_SCHEMA', 'appwrite'), "database_1_collection_{$internalId}")) {
|
||||
return;
|
||||
}
|
||||
Console::log("- {$id} ({$collection->getAttribute('name')})");
|
||||
|
||||
try {
|
||||
|
@ -196,7 +193,11 @@ class V14 extends Migration
|
|||
name = 'database_1_collection_{$internalId}'
|
||||
WHERE _uid = 'collection_{$internalId}';
|
||||
")->execute();
|
||||
} catch (\Throwable $th) {
|
||||
Console::warning($th->getMessage());
|
||||
}
|
||||
|
||||
try {
|
||||
$collection
|
||||
->setAttribute('databaseId', 'default')
|
||||
->setAttribute('databaseInternalId', '1');
|
||||
|
|
Loading…
Reference in a new issue