mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 01:18:37 +00:00
Add teams migration
This commit is contained in:
parent
b0a6190394
commit
43946cade5
1 changed files with 18 additions and 1 deletions
|
|
@ -58,7 +58,7 @@ class V18 extends Migration
|
|||
if ($attribute['type'] !== Database::VAR_FLOAT) {
|
||||
continue;
|
||||
}
|
||||
$this->changeAttributeInternalType($collectionTable, $attribute['$id'], 'DOUBLE');
|
||||
$this->changeAttributeInternalType($collectionTable, $attribute['key'], 'DOUBLE');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -95,6 +95,17 @@ class V18 extends Migration
|
|||
Console::warning("'passwordHistory' from {$id}: {$th->getMessage()}");
|
||||
}
|
||||
break;
|
||||
case 'teams':
|
||||
try {
|
||||
/**
|
||||
* Create 'prefs' attribute
|
||||
*/
|
||||
$this->createAttributeFromCollection($this->projectDB, $id, 'prefs');
|
||||
$this->projectDB->deleteCachedCollection($id);
|
||||
} catch (\Throwable $th) {
|
||||
Console::warning("'prefs' from {$id}: {$th->getMessage()}");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -132,6 +143,12 @@ class V18 extends Migration
|
|||
*/
|
||||
$document->setAttribute('passwordHistory', []);
|
||||
break;
|
||||
case 'teams':
|
||||
/**
|
||||
* Default prefs
|
||||
*/
|
||||
$document->setAttribute('prefs', new \stdClass());
|
||||
break;
|
||||
}
|
||||
|
||||
return $document;
|
||||
|
|
|
|||
Loading…
Reference in a new issue