Skip to content

Commit

Permalink
Don't use binary column types to represent ids
Browse files Browse the repository at this point in the history
for greater compatibility
  • Loading branch information
bwaidelich committed Jan 15, 2024
1 parent 0e314fe commit 0574fc3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/DoctrineEventStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Doctrine\DBAL\Exception\DeadlockException;
use Doctrine\DBAL\Exception\LockWaitTimeoutException;
use Doctrine\DBAL\Exception\UniqueConstraintViolationException;
use Doctrine\DBAL\Platforms\SqlitePlatform;
use Doctrine\DBAL\Result;
use Doctrine\DBAL\Schema\AbstractSchemaManager;
use Doctrine\DBAL\Schema\Column;
Expand Down Expand Up @@ -204,16 +205,16 @@ private function createEventStoreSchema(AbstractSchemaManager $schemaManager): S
(new Column('metadata', Type::getType(Types::TEXT))),

// The unique event id, usually a UUID
(new Column('id', Type::getType(Types::BINARY)))
(new Column('id', Type::getType(Types::STRING)))
->setLength(36),

// An optional correlation id, usually a UUID
(new Column('correlationid', Type::getType(Types::BINARY)))
(new Column('correlationid', Type::getType(Types::STRING)))
->setNotnull(false)
->setLength(36),

// An optional causation id, usually a UUID
(new Column('causationid', Type::getType(Types::BINARY)))
(new Column('causationid', Type::getType(Types::STRING)))
->setNotnull(false)
->setLength(36),

Expand Down

0 comments on commit 0574fc3

Please sign in to comment.