RikMigrations is a database migration library for .NET based on the migrations facility provided by Ruby on Rails. It allows simple upgrading and downgrading of databases using .NET code (such as VB or C#) either from the command line or built into your application. Unlike many other migration frameworks, RikMigrations is a stand-alone library which does not rely on a large surrounding framework.
You can download RikMigrations from CodePlex.
- Create/drop tables and columns
- Set columns as primary keys, foreign keys, unique constraints, not-null, default values, identity
- Group migrations into modules which are versioned independantly
- Run migrations from command line
- Run migrations from code
- Auto generate migrations from existing database (see blog post for details)
- Only supports MS SQL databases.
- Only supports tables - no views, stored procedures, etc...
RikMigrations documentation is currently being developed.
A basic tutorial on RikMigrations is available here.
Some directions on subsequent migrations is here.
Information on specifying types is available here.
More advanced topics are discussed here including Primary Keys & Foreign Keys.