jpoehls / dotnetmigrations

DotNetMigrations is a database migration framework that assists in managing and versioning database changes. It was originally designed as a straight port of the rails functionality located in the Ruby on Rails framework; however, has recently moved into a more open framework thanks to the power of the Managed Extensibility Framework.
Other
36 stars 10 forks source link

Warn when migration script has changed #10

Open jpoehls opened 14 years ago

jpoehls commented 14 years ago

A big pothole with migrations is when someone changes a migration script after it has already been run. Can we find someway to warn/break when this happens? RoundhouseE DB has some logic to check for this. (http://www.google.com/url?sa=D&q=http%3A%2F%2Fferventcoder.com%2Farchive%2F2009%2F11%2F13%2Froundhouse-db-migration-action-shots.aspx)

kieranbenton commented 13 years ago

We are using DotNetMigrations in anger now and we don't really have a satisfactory answer to this yet - if you have any experience to offer I'd love to discuss it.

jpoehls commented 13 years ago

Currently the only advice I can offer here is discipline. If you have checked-in a migration script, don't change it. Ever. If you follow that rule then all should be well.