Fluent NHibernate AutoMapping SchemaExport - change object model and save data

Is there a way to freely simulate a schema change when changing the model of a data object (adding a new property to the class), currently it only reduces and recreates the database schema, which will lose all the data in the database, Can it use the Alter table instead of drop / create table, or am I just dreaming?

Is it free to update the database schema according to automation without data loss?

Greetings

+3
source share
1 answer

Doh!

Just use

new SchemaUpdate(config).Execute(false, true); 

instead

new SchemaCreate(config).Execute(yadda yadda);
+6
source

All Articles