percolatestudio / meteor-migrations

Simple migration system for Meteor
https://atmospherejs.com/percolate/migrations
MIT License
245 stars 58 forks source link

Feature request: Logging of what migration ran and when #53

Open ghost opened 8 years ago

ghost commented 8 years ago

Currently, the migrations collection only keeps track of the current migration and whether or not control is locked. While this is helpful information, it'd be great if there was an option for the package to insert a document in the collection that stored what migration ran, when it ran, if it was successful, and which direction it was run. It may be something that is disabled by default and enabled with a configuration option.

ghost commented 8 years ago

I forgot to mention, I'm happy to create a pull request for this as well.

zol commented 8 years ago

That would be great. Our SyncedCron package has a cronHistory collection to do something similar.

ghost commented 8 years ago

I also just thought of something to go along with this: if logging is enabled and a migration fails, since that's being logged, it'd be helpful to log the error message if possible as well. I just ran into an issue where at some point after deploying with mup, migrations locked and I'm having trouble finding it in the mup logs.