Skip to content

Commit

Permalink
remove legacy tenant id index
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskapp committed Aug 25, 2024
1 parent aff45b1 commit f1ee792
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Migrations/Version20240822171833.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ public function up(Schema $schema): void
if (!$logTable->hasIndex('IDX_LOG_TUD')) {
$logTable->addIndex(['tenant_id', 'user_id', 'date'], 'IDX_LOG_TUD');
}

$indexes = $logTable->getIndexes();
foreach ($indexes as $index) {
if ($index->getColumns() === ['tenant_id']) {
$logTable->dropIndex($index->getName());
}
}
}

public function down(Schema $schema): void
Expand Down

0 comments on commit f1ee792

Please sign in to comment.