Run Linter

This commit is contained in:
Bradley Schofield 2024-02-20 15:05:42 +00:00
parent 441875e498
commit bfe861f846

View file

@ -78,14 +78,18 @@ class V20 extends Migration
// Support database array type migration (user collections) // Support database array type migration (user collections)
if ($collectionType === 'projects') { if ($collectionType === 'projects') {
foreach ($this->documentsIterator('attributes', [ foreach (
$this->documentsIterator('attributes', [
Query::equal('array', [true]), Query::equal('array', [true]),
]) as $attribute) { ]) as $attribute
) {
$foundIndex = false; $foundIndex = false;
foreach ($this->documentsIterator('indexes', [ foreach (
$this->documentsIterator('indexes', [
Query::equal('databaseInternalId', [$attribute['databaseInternalId']]), Query::equal('databaseInternalId', [$attribute['databaseInternalId']]),
Query::equal('collectionInternalId', [$attribute['collectionInternalId']]), Query::equal('collectionInternalId', [$attribute['collectionInternalId']]),
]) as $index) { ]) as $index
) {
if (in_array($attribute['key'], $index['attributes'])) { if (in_array($attribute['key'], $index['attributes'])) {
$this->projectDB->deleteIndex($index['collectionId'], $index['$id']); $this->projectDB->deleteIndex($index['collectionId'], $index['$id']);
$foundIndex = true; $foundIndex = true;