views:

27

answers:

1

Given: A DB (containing data), a set of model entity objects, and working NHibernate (fluent) mappings. What is the easiest way to generate the required new DB tables, when new model entities and mappings are added?

+2  A: 

NHibernate doens't have a build-in migrations tool. It can generate the whole database, you cannot select parts from it. The best you can do with NHibernate is dump the sql-log of the database generation and copy paste the new parts in a sql script.

Paco
There is a `SchemaUpdate` tool as well as the `SchemaExport`, though I'm not certain of it's capabilities.
James Gregory
Schema update does a lot, but not everything. Adding new tables seems to work fine, but removing or changing does not work or does strange things. I think it's unfinished. The java version seems to do more than the .net version.
Paco