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
2010-05-07 12:38:19
There is a `SchemaUpdate` tool as well as the `SchemaExport`, though I'm not certain of it's capabilities.
James Gregory
2010-05-07 14:19:18
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
2010-05-07 14:30:47