3

Is there a way for the fluent automapping to alter a schema when the data object model changes (adding a new property to a class), currently it only drops and recreates the database schema, which would lose all the data in the database. Can it use Alter table instead of drop / create table, or am I just dreaming?

Can fluent update the database schema according to automapping without losing data?

Cheers,

1 Answers1

6

Doh!

Just use

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

instead of

new SchemaCreate(config).Execute(yadda yadda);
robert
  • 33,242
  • 8
  • 53
  • 74