.NET Migrations

InfoQ just blogged on a couple of .NET Migrations third-party libraries, which is something I’ve often wished the .NET world had.

.NET Migrations

The tutorial linked at the end of that article is a goodie.

Check it out in your spare time. There’s a big prize (read: kudos from me) for the first developer to make this work with GDB modelling…

Not quite as smooth as Rails migrations, but great anyhow.

Reblog this post [with Zemanta]

About Ruprict

I am a nerd that is a Nerd Wannabe. I have more kids than should be allowed by law, a lovely wife, and a different sense of humor than most. I work in the field of GIS, where I am still trying to find myself on the map. View all posts by Ruprict

4 responses to “.NET Migrations

  • viswaug

    Hey Glenn,

    I actually don’t like the concept of the migrations for the following reasons

    1) I have to do the work twice. Create the tables in the DB and then take the time to create these migrations and keep them updated.

    2) Another thing to maintain. There are bound to be oversights here where the DB gets changed but the migrations are not.

    3) Databases have more complex things like SPs, table valued functions, indexes etc which may not always be expressed in migrations

    I know I might be going against the popular migrations thing but thats my take on it.

    Here is what I would suggest… Use a tool like SQLCompare that will script out your DB to a script file and include that script file in your SVN. Use a Nant taskk to make it a part your build process.

    W.R.T Geodatabases, here is an idea I have been wanting to prototype for a while by creating a Nant task for it… Write an utility to export your GDB schema to a XML workspace document (pretty easy to do) ans stash that XML file into your SVN so that you can revert back to that version if needed. A Nant task can be written for it to make it a part of the automated build process.

    Do I get a gift for that idea???

    Thank You,

  • Ruprict


    How are ya?

    1) Well, you *might* have to do *some* of the work twice. The migration will create tables, columns, foreign keys, etc. Most of the basic stuff (I am talking Rails migrations, which I haven’t looked at in a while) The SPs and other programmable objects is where DRY starts to get wet.

    2) True, but if you are SVNing your DDL, isn’t this always gonna be true?

    3) See 1.

    I like your idea….make it so. Oh, and is there any more beautiful gift than my undying admiration? Consider that your gift….

  • viswaug

    Hey Glenn,

    2 – I can automate the scripting of the DBs by running the SQLCompare tool against the DB and I don’t have to write and maintain it manually. Nant tasks already exist to call executables with parameters. I am bound to mess up if I do it manually …

    Thank You,

  • Willie

    I believe the subsonic project has migrations in it. I believe it will just help with simple adding and removing tables/columns and what not, but it is open source so could be expanded.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: