Search code examples
databaseentity-frameworkdeploymentdbmigrateredgate

Cheaper alternative for RedGate ReadyRoll


RedGate ReadyRoll is wonderful DB versioning tool which works like a charm. But the only one drawback - price. I've researched what to use and found DBUp, Envolve... These tools are good but:

  1. Doesn't have ability to define Up and Down scripts to be able apply and rollback migrations
  2. Apply migration based on name ordering and not creation time. It's not big issue because developers could give the name based on the time but...

These tools doesn't allow to do development in different branches when developers uses not shared DB but their own and change DB schema separately. How to handle the issues when Team Lead have to switch between branches or when QA have to test feature before it goes to master - it's open question for me.

Using SSDT - as a case but it makes live very difficult if need do something with a DATA and not only with schema. What can be done very simple if use migration-based approach - becomes really big issue when try to do it with state-based one.

Can somebody suggest some tool for DB versioning with migration-based approach which can work with .NET stack and been free or paid but cheaper than RedGate?

Thanks

P.S.

What if use Entity Framework only for migrations? Without entities, etc. Create DB Context and do everything just to create migration files which has Up/Down and then write there scripts or define sql file to apply up/down migration changes. The only question - it's snapshots. How it will works with it. Have somebody used this approach?


Solution

  • We have decided to use EF Code First migrations to do what we need. If compare it with DbUp - EF Code First migrations contains Down script which allows us rollback DB to any target migration script. Yes, it's not alternative for ReadyRoll and I have to accept that there are no any similar product which is surprised for me. But it does what we need and after more than 1 month of usage I can say - it fit for our needs.

    Because we we use EF Code First only for migrations scripts there is no issue with Team Collaboration described here because snapshot is always the same if your context doesn't have any entities.