prooph / pdo-event-store

PDO implementation of ProophEventStore http://getprooph.org
BSD 3-Clause "New" or "Revised" License
111 stars 56 forks source link

Column length of `event_streams.stream_name` might be too short #215

Closed jsor closed 5 years ago

jsor commented 5 years ago

Since #159 introduced schema support, a stream name can be longer than 41 chars (_ + sha1($streamName)) when it is prefixed with the schema name.

So, the column definition of CHAR(41) in the sql scripts provided might not be of sufficient length.

https://github.com/prooph/pdo-event-store/blob/2eede0b5d47b1e7b3198dee50784d95dacd0a191/scripts/postgres/01_event_streams_table.sql#L4

prolic commented 5 years ago

That's correct, the provided column definition is meant to work with some defaults, but you might need to tweak it for your use-case (alter the length, add additional indexes, and so on). There is no way to provide defaults that work for all users without compromising performance.

I hope this explanation helps.