tags:

views:

29

answers:

2

This is a long shot, but is anyone aware of any libraries that would compare a database schema with [something] (a script, a c# definition, a backup file...anything) and if any fields, tables, relationships are missing, fix the database?

The idea being that when a user first starts up a program, it adds all the necessary database objects in, and then if there's a database update any time, it automatically adds that update in, and if the user decides they want to delete a column in the database, it will recreate it automatically?

+1  A: 

What you are describing sounds like ruby on rails migrations.

There are two libraries I know of that do this - RikMigrations and MigratorDotNet for the .NET platform.

Oded
RikMigrations looks perfect thanks
Paul
+1  A: 

You can use NHibernate Mappings and schema Export to generate your database and check the schema each time you start you application.

Zebi