migrating-ravens / RavenMigrations

A small migrations framework to help you manage your RavenDB Instance.
MIT License
53 stars 24 forks source link

Extend runner to show which migrations need to run, and which migrations have already run #8

Closed brunomlopes closed 10 years ago

brunomlopes commented 10 years ago

I'm looking at using this project, and one of the things I'd like to do is to have an admin status page where I can run the migrations (or get them to run in the background).

To do that I wanted to show which migrations have already run.

I propose to extend the Runner to have a method that returns migrations and their status (Done, To Do ?), to allow surfacing of such status.

I was working on a pull request for it, but wanted to check with you beforehand if this is valid, and if there's anything I should pay particular attention to. I intend to submit corresponding tests, so no undue breakage should happen.

khalidabuhakmeh commented 10 years ago

I probably wouldn't do this right in the migrations. Remember, these are just documents in your RavenDB instance. I would just write that functionality into your application using your document session. That way you can create any sort of querying or paging you need for your UI.