hirethunk / verbs

Verbs is an event sourcing package for PHP artisans
https://verbs.thunk.dev
MIT License
412 stars 32 forks source link

Allow for non unique state IDs #144

Closed inxilpro closed 2 months ago

inxilpro commented 4 months ago

Right now, Verbs snapshots have a unique id primary key, which means that you can only have one of any given ID snapshotted at any given time. This is fine if you use snowflakes for everything, but if you don't that can be an issue.

@skylerkatz and I paired on this for a while, and I know there were issues remaining, but I can't remember what they are. I'm going to post this up as a draft while I review it and maybe add some more tests.

inxilpro commented 2 months ago

@skylerkatz I forgot to push up a couple changes. Can you take another look?

Also—I agree that we should think about allowing Verbs to run without snowflakes at all. Let's discuss at some point.