开发者

.NET - Database deployments similar to Rails

I have a .NET application that uses a database. I am familiar with how Rails handles database deployments where there is a set of scripts that have an 'UP' and 'DOWN' method with a set of SQL in each to deploy/rollback changes to your database. The rak开发者_如何学JAVAe command will then execute these scripts in order.

I was interested in a similar process for my .NET application and was hoping there was something similar already written. I don't think it would be hard to write my own to do this process, but I was hoping to avoid re-inventing the wheel.

Thanks for any direction.


Try Migrator.Net if what you want is rails-like migrations with simple up/down methods for adding/removing tables, columns, indexes, keys etc, and written in C#/VB etc.


There is the Tarantino project, that aims to solve this problem.


Look at Visual Studio Database project


Visual studio supports a database project type that has folders that can contain "Post-Deployment" and "Pre-Deployment" scripts to run. MSDeploy may then be used to execute these scripts (as well as other DDL) during the deployment process. Here is the documentation on MSDN regarding the use of Pre- and Post-Deployment script definition.


Here at Red Gate, we're currently building in a migrations feature into SQL Compare and SQL Source Control. If you're interested and you'd like more information on how this will work, please email me at David dot Atkinson at red-gate dot com. We're keen to get some feedback on our ideas.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜