mirror of
https://github.com/appwrite/appwrite
synced 2026-05-22 16:38:32 +00:00
Apply suggestions from code review
This commit is contained in:
parent
b60c591f8f
commit
4d7becc459
3 changed files with 6 additions and 6 deletions
|
|
@ -77,18 +77,18 @@ class V20 extends Migration
|
|||
// Support database array type migration (user collections)
|
||||
foreach (
|
||||
$this->documentsIterator('attributes', [
|
||||
Query::equal('array', [true]),
|
||||
Query::equal('array', [true]),
|
||||
]) as $attribute
|
||||
) {
|
||||
$foundIndex = false;
|
||||
foreach (
|
||||
$this->documentsIterator('indexes', [
|
||||
Query::equal('databaseInternalId', [$attribute['databaseInternalId']]),
|
||||
Query::equal('collectionInternalId', [$attribute['collectionInternalId']]),
|
||||
Query::equal('databaseInternalId', [$attribute['databaseInternalId']]),
|
||||
Query::equal('collectionInternalId', [$attribute['collectionInternalId']]),
|
||||
]) as $index
|
||||
) {
|
||||
if (in_array($attribute['key'], $index['attributes'])) {
|
||||
$this->projectDB->deleteIndex($index['collectionId'], $index['_uid']);
|
||||
$this->projectDB->deleteIndex($index['collectionId'], $index['$id']);
|
||||
$foundIndex = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ class V17 extends Filter
|
|||
|
||||
protected function parseToken(array $content)
|
||||
{
|
||||
unset($content['securityPhrase']);
|
||||
unset($content['phrase']);
|
||||
return $content;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ class V17Test extends TestCase
|
|||
return [
|
||||
'remove securityPhrase' => [
|
||||
[
|
||||
'securityPhrase' => 'Lorum Ipsum',
|
||||
'phrase' => 'Lorum Ipsum',
|
||||
],
|
||||
[
|
||||
],
|
||||
|
|
|
|||
Loading…
Reference in a new issue