commanded / eventstore

Event store using PostgreSQL for persistence
MIT License
1.06k stars 146 forks source link

Checking for pending migrations #206

Closed kaikuchn closed 4 years ago

kaikuchn commented 4 years ago

Hey folks,

first I'd like to say thank you for all your efforts, this is an amazing project! We really love using it at @ studitemps.

There is just one thing that has bitten us over and over: we forget to run migrations. Since we can't seem to remember to run migrations we considered to just always run them. However, we cannot do that with our production database since we have to carefully consider the impact of the migration script on the events table that is containing millions of events.

It would be nice if there was a task that just checked for pending migrations. Maybe similar to mix ecto.migrations which lists the status of all migrations. However, it would be very cool if that process exited with a non-zero status code when migrations are pending.

If this sounds useful to you and would be something you'd like to add, I can whip up a quick PR as a proposal if you'd like.

Best regards, Kai

slashdotdash commented 4 years ago

I haven't seen the mix ecto.migrations task before, that's neat. I'd be happy to accept a PR to add a similar task to either list pending EventStore migrations or their status (up / down).

slashdotdash commented 4 years ago

Done in #207.