From f10a9d3972a295c02e0246eb600a1e4e1518c84b Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sun, 15 Dec 2024 10:08:22 +0100 Subject: [PATCH] Simplify geolocation_db_updates indexes --- ...kio.Shlink.Core.Geolocation.Entity.GeolocationDbUpdate.php | 4 ++-- module/Core/migrations/Version20241212131058.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/module/Core/config/entities-mappings/Shlinkio.Shlink.Core.Geolocation.Entity.GeolocationDbUpdate.php b/module/Core/config/entities-mappings/Shlinkio.Shlink.Core.Geolocation.Entity.GeolocationDbUpdate.php index 20a67c98..e7f10ca1 100644 --- a/module/Core/config/entities-mappings/Shlinkio.Shlink.Core.Geolocation.Entity.GeolocationDbUpdate.php +++ b/module/Core/config/entities-mappings/Shlinkio.Shlink.Core.Geolocation.Entity.GeolocationDbUpdate.php @@ -53,6 +53,6 @@ return static function (ClassMetadata $metadata, array $emConfig): void { // Index on date_updated, as we'll usually sort the query by this field $builder->addIndex(['date_updated'], 'IDX_geolocation_date_updated'); - // Index on status and filesystem_id, as we'll usually filter the query by those fields - $builder->addIndex(['status', 'filesystem_id'], 'IDX_geolocation_status_filesystem'); + // Index on filesystem_id, as we'll usually filter the query by this field + $builder->addIndex(['filesystem_id'], 'IDX_geolocation_status_filesystem'); }; diff --git a/module/Core/migrations/Version20241212131058.php b/module/Core/migrations/Version20241212131058.php index 59286931..e27958f6 100644 --- a/module/Core/migrations/Version20241212131058.php +++ b/module/Core/migrations/Version20241212131058.php @@ -46,8 +46,8 @@ final class Version20241212131058 extends AbstractMigration // Index on date_updated, as we'll usually sort the query by this field $table->addIndex(['date_updated'], 'IDX_geolocation_date_updated'); - // Index on status and filesystem_id, as we'll usually filter the query by those fields - $table->addIndex(['status', 'filesystem_id'], 'IDX_geolocation_status_filesystem'); + // Index on filesystem_id, as we'll usually filter the query by this field + $table->addIndex(['filesystem_id'], 'IDX_geolocation_status_filesystem'); } public function down(Schema $schema): void