Is there a reason why the stored_events table's aggregate_uuid column is nullable? #439
-
I was looking into the migration files and the aggregate_uuid field being nullable caught my eye. I searched the commit history, but couldn't find any reason for it. Haven't found any discussions, issues, or PRs for this either. I understand that I can modify the migration files for my own application. Just curious why such a decision was made since all aggregate roots have to have UUIDs 🤔 In case this was not intended - I'd be willing to submit a PR to request the changes. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It's nullable because you can use our package without aggregate roots. You can dispatch events using Laravel's event system to run them through projectors and reactors if you don't care about encapsulating concepts in aggregate roots. Here's an (older) example app that doesn't use aggregate roots: https://github.com/spatie/larabank-projectors |
Beta Was this translation helpful? Give feedback.
It's nullable because you can use our package without aggregate roots. You can dispatch events using Laravel's event system to run them through projectors and reactors if you don't care about encapsulating concepts in aggregate roots.
Here's an (older) example app that doesn't use aggregate roots: https://github.com/spatie/larabank-projectors