Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I generate "migration" DDL from NHibernate mapping files?

I'm using NHibernate 2 and PostgreSQL in my project. SchemaExport class does a great job generating DDL scheme for database, but it's great until the first application.

Is there any way to generate "migration" DLL (batch of "ALTER TABLE"'s instead of DROP/CREATE pair) using NHibernate mapping files?

like image 898
Artem Tikhomirov Avatar asked Sep 22 '08 14:09

Artem Tikhomirov


1 Answers

Look into SchemaUpdate. Very similiar API as SchemaExport but it only creates migrations.

like image 79
Ryan Rinaldi Avatar answered Oct 17 '22 01:10

Ryan Rinaldi