Curtis Mitchell recently posted the slides from a presentation entitled Rails-like ASP.NET Development. Its great to see more people thinking about the tools and technology they use. I found a tool in the slides that I am unfamiliar with called Migrator.NET
Database migrations for .NET. Based on the idea of Rails ActiveRecord Migrations.
Supported Databases
- MySQL
- Oracle (not well tested?)
- PostgreSQL
- SQLite
- SQL Server
Supported Modes
- NAntTask
- MSBuildTarget
- Console Application (You should be using an automation tool!
)
1: using Migrator.Framework;
2: using System.Data;
3:
4: namespace DBMigration
5: {
6: [Migration(20080401110402)]
7: public class CreateUserTable_001 : Migration
8: {
9: public void Up()
10: {
11: Database.CreateTable("User",
12: new Column("UserId", DbType.Int32, ColumnProperties.PrimaryKeyWithIdentity),
13: new Column("Username", DbType.AnsiString, 25)
14: );
15: }
16:
17: public void Down()
18: {
19: Database.RemoveTable("User");
20: }
21: }
22: }













You may also try Wizardby ( http://code.google.com/p/octalforty-wizardby ). It’s much closer to Rails Migrations since it uses a special DSL for expressing migrations rather than C# code.
Thanks! I’ll be sure to check it out. I am working on automating a complex deployment process right now, including the database, and would love to move to using migrations instead of SQL scripts.
Thanks!