From 248c1dc30ce14e4bb37ec5955ec46ea83af18a5b Mon Sep 17 00:00:00 2001 From: David Badura Date: Mon, 4 Mar 2024 10:23:23 +0100 Subject: [PATCH 1/2] try guid for aggregate id --- src/Store/DoctrineDbalStore.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Store/DoctrineDbalStore.php b/src/Store/DoctrineDbalStore.php index 3725746fc..1fdeff401 100644 --- a/src/Store/DoctrineDbalStore.php +++ b/src/Store/DoctrineDbalStore.php @@ -276,7 +276,7 @@ public function configureSchema(Schema $schema, Connection $connection): void $table->addColumn('aggregate', Types::STRING) ->setLength(255) ->setNotnull(true); - $table->addColumn('aggregate_id', Types::STRING) + $table->addColumn('aggregate_id', Types::GUID) ->setLength(36) ->setNotnull(true); $table->addColumn('playhead', Types::INTEGER) From 46b3373a12a0c9f8eb47a84dfe7a2660596c6410 Mon Sep 17 00:00:00 2001 From: David Badura Date: Mon, 4 Mar 2024 12:42:18 +0100 Subject: [PATCH 2/2] remove archived based index --- src/Store/DoctrineDbalStore.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Store/DoctrineDbalStore.php b/src/Store/DoctrineDbalStore.php index 1fdeff401..ca4bf8479 100644 --- a/src/Store/DoctrineDbalStore.php +++ b/src/Store/DoctrineDbalStore.php @@ -299,6 +299,6 @@ public function configureSchema(Schema $schema, Connection $connection): void $table->setPrimaryKey(['id']); $table->addUniqueIndex(['aggregate', 'aggregate_id', 'playhead']); - $table->addIndex(['aggregate', 'aggregate_id', 'playhead', 'archived']); + //$table->addIndex(['aggregate', 'aggregate_id', 'playhead', 'archived']); } }