Skip to content

Commit

Permalink
Omit custom collations/charsets per column
Browse files Browse the repository at this point in the history
  • Loading branch information
bwaidelich committed Jan 15, 2024
1 parent ba2f73b commit 0e314fe
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/DoctrineEventStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,27 +187,21 @@ private function createEventStoreSchema(AbstractSchemaManager $schemaManager): S

// The stream name, usually in the format "<BoundedContext>:<StreamName>"
(new Column('stream', Type::getType(Types::STRING)))
->setLength(StreamName::MAX_LENGTH)
->setCustomSchemaOption('charset', 'ascii')
->setCustomSchemaOption('collation', 'ascii_general_ci'),
->setLength(StreamName::MAX_LENGTH),

// Version of the event in the respective stream
(new Column('version', Type::getType(Types::BIGINT)))
->setUnsigned(true),

// The event type, often in the format "<BoundedContext>:<EventType>"
(new Column('type', Type::getType(Types::STRING)))
->setLength(EventType::MAX_LENGTH)
->setCustomSchemaOption('charset', 'ascii')
->setCustomSchemaOption('collation', 'ascii_general_ci'),
->setLength(EventType::MAX_LENGTH),

// The event payload, usually stored as JSON
(new Column('payload', Type::getType(Types::TEXT)))
->setCustomSchemaOption('collation', 'utf8mb4_unicode_520_ci'),
(new Column('payload', Type::getType(Types::TEXT))),

// The event metadata stored as JSON
(new Column('metadata', Type::getType(Types::TEXT)))
->setCustomSchemaOption('collation', 'utf8mb4_unicode_520_ci'),
(new Column('metadata', Type::getType(Types::TEXT))),

// The unique event id, usually a UUID
(new Column('id', Type::getType(Types::BINARY)))
Expand Down

0 comments on commit 0e314fe

Please sign in to comment.