SRoddis/Mongo.Migration

Rollback migrations

Closed this issue · 2 comments

Hello!

Thanks for your application.

May be I'm not so good in search, but I cannot find a way to rollback migration in attached documentation. Could you provide me the right way to do this.
And another question - do you application provide possibility to rollback to initial version of document in database (document without version field) or we must add field to document that will contain initial version number?

Thanks!

Hey Almarein,

you just need to deploy your application and change the "RunTimeVersion" or "StartUpVersion" Annotation back to the version you want. If you dont use fast forward deployment, then you need to deploy the migrations in a seperat projekt. Otherwise the "down" migration will not exist, because it does not exist in the version of you application.

I will add a section to the documentation.

Thanks for the question.
Tell me if you need any further help.

Cheers, Sean

Thank you! This works.