public override void Up() {
    CreateTable("Users")
        .Int("Id").PrimaryKey()
        .String("Name", 255).NotNull()
        .Execute();
}

public override void Down() {
	DropTable("Users");
}
C:\>dbrefactor.exe SiteMigrations.dll
DbRefactor is an open source software for refactoring your database
Download DbRefactor - Free
version 2.0 preview

DbRefactor 2.0 preview

July 15th, 2009

We've made a release of DbRefactor preview. Please, take a look at Source/Example/Demonstration.cs file for current API version. This subject are to change in the nearest feature, but we aren't going to make big changes.

To create a database migrations, just add a class library project to your visual studio solution, add a reference to DbRefactor.dll (you'l find it in dbrefactor package). Create a few migrations inspired by our Demonstration.cs file (but it is recommended to put each migration to separate file). Create a database in sql server. Then run dbrefactor.exe from command line similar to this:DbRefactor.exe SqlServer "Data Source=.\SQLExpress;Initial Catalog=database_name;Integrated Security=SSPI" ClassLibraryWithMigrations.dll

Quick start and manual are currently in development.

DbRefactor status

June 17th, 2009

Currently we are refining DbRefactor to fully support fluent interface and finally release stable version.