0

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?

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

2 Comments

There is a SchemaUpdate tool as well as the SchemaExport, though I'm not certain of it's capabilities.
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.