SQL migration tool [closed]


I want to write a SQL migration tool. This tool must:

<ul><li>merge new scripts in a folder,</li> <li>validate the merging of those scripts, </li> <li>run those scripts against a database. </li> <li>if a validation error occurred, then highlight the invalid rows.</li> <li>if the script was successful deployed, I want to save this information in a database with the version and other related information. </li> </ul>

Can I do this with some validation framework, or maybe can I use nHibernate?


Not exactly what your asking for but I think I know what your trying to achieve.

<a href="http://code.google.com/p/migratordotnet/" rel="nofollow">http://code.google.com/p/migratordotnet/</a>

<a href="http://ayende.com/Blog/archive/2009/05/01/nhibernate-validator.aspx" rel="nofollow">http://ayende.com/Blog/archive/2009/05/01/nhibernate-validator.aspx</a>

And also Schema Updater (part of NHibernate)

This blog has a code sample. <a href="http://morten.lyhr.dk/2008/03/nhibernates-schemaupdate-feature.html" rel="nofollow">http://morten.lyhr.dk/2008/03/nhibernates-schemaupdate-feature.html</a>


A little bit late to the party here, but this is a good addition to the list:-

<strong><a href="https://github.com/schambers/fluentmigrator" rel="nofollow">FluentMigrator</a></strong>

FluentMigrator is a database migration framework for .NET written in C#. The basic idea is that you can create migrations which are simply classes that derive from the Migration base class and have a Migration attribute with a unique version number attached to them. Upon executing FluentMigrator, you tell it which version to migrate to and it will run all necessary migrations in order to bring your database up to that version.

In addition to forward migration support, FluentMigrator also supports different ways to execute the migrations along with selective migrations called profiles and executing arbitrary SQL.


Try DBSourceTools. <a href="http://dbsourcetools.codeplex.com" rel="nofollow noreferrer">http://dbsourcetools.codeplex.com</a> <br /> By using the patching engine, it will allow you to reliably test patch scripts against a database at a known state.<br /> It is an open source tool that combines features of Visual Studio Database Edition and MSSQL Management Studio.<br /> Ideally, you would want to test all scripts that you are running in any sort of migration.<br /> Why would you need to store whether a validation error occurred in a script ?<br /> Surely this means that the script was not tested correctly ?<br /> Have fun.


  • Convert Date to CYYMMDD SQL-Server
  • Getting DATEPART in HQL or Criteria?
  • @selector and return value
  • Best way to delete all rows in a table using NHibernate?
  • When the command / start is sent to the bot, the bot should delete the stickers sent to the group; b
  • wp8 app store localization for app name
  • Is it bad to put WITH PERMISSION_SET = UNSAFE in SQL 2005?
  • What are F# quotations?
  • How to play background music in windows phone 8.1 with xaml and c#?
  • NHibernate - Could not execute query - Input string was not in a correct format
  • Android - Best practice for a periodic service
  • How do I get NHibernate to save an entity if I assign it an ID, but generate one otherwise?
  • Generate a business key
  • Nested projects in multiproject visual studio templates
  • Retaining data after updating application
  • Examples of how to a STS in .Net 4.5 using WCF
  • Trying to get the char code of ENTER key
  • Android Studio 1.3 RC3. Google Play services out of date. Requires 7571000 but found 6774470
  • android google indoor map
  • Reading a file into a multidimensional array
  • Android Google Maps API v2 start navigation
  • Android application: how to use the camera and grab the image bytes?
  • Loading .coffee files via a view in Rails
  • Insert new calendar with SyncAdapter- Calendar API Android
  • How can I enlarge video fullscreen without the affected interface project in as3?
  • ActiveRecord query for a count of new users by day
  • How to clear text inside text field when radio button is select
  • NHibernate Validation Localization with S#arp Architecture
  • Scrapy recursive link crawler
  • Seeking advice on Jetty HttpClient Hang
  • What is Eclipse's Declaration View used for?
  • Jquery - Jquery Wysiwyg return html as a string
  • Google cloud sdk not working when python points python3
  • SVN: Merging two branches together
  • jqPlot EnhancedLegendRenderer plugin does not toggle series for Pie charts
  • using HTMLImports.whenReady not working in chrome
  • Append folder name and increment by 1 using batch script
  • JaxB to read class hierarchy
  • How to get NHibernate ISession to cache entity not retrieved by primary key
  • Android Heatmap on canvas or ImageView