I'm looking to refine my workflow around NHibernate and a relatively frequently changing schema, and how best to deal with this - I would like the same solution to apply to production systems, so I think I need a migration engine rather than just Schema Update.
What I want to know is how i can refine the workflow as far as possible so that I'm doing as little work as possible to get my database in sync with my domain model. The tarantino approach of scripts looks nice, but there doesn't seem to be a way to generate the update script from my nHibernate mappings, so i'm down to hand crafting a script or using a redgate sql compare like tool. Is there anything I'm missing that would make life easier around the script generation stage?
Thanks, Chris
I haven't used any of these migration tools for .net myself, but when trying out Ruby on Rails on my spare time some years ago, I saw the benefits of migrations compared to the t-sql scripts we used at my job at the time.
In a recent project I've been, we've discovered that migrations, combined with VCS branching and NHibernate can cause several headaches and drawbacks along the way.
What we did was to set up NHibernate to generate the schema with each automated build (for the development environment) along with some data loading.
For the production environment, we had a script that based on the current schema and the desired schema, it generated one migration with the necessary fields and modifications.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With