C# – SubSonic 3 auto migrations in a live environment

csubsonic

I'm looking at using SubSonic 3 as my preferred OR mapper on a new project and have a question that I can't seem to find an answer to…

I'm looking to use the SimpleRepository approach, and I've noticed that I can specify a "SimpleRepositoryOption" parameter which appears to be a hint to SubSonic as to whether it should cascade schema changes to the DB or not.

My question is should I be enabling this in development (SimpleRepositoryOption.RunMigrations) and then disable it for the live environment (SimpleRepositoryOption.None)? Or is there a way of using a config setting to determine whether these schema updates will take place or not?

I'm just assuming that once I've got a (relatively) fixed generated DB schema I don't want to SubSonic to be interrogating it for changes everytime I perform a CRUD operation. Unless of course SubSonic somehow manages this itself without impacting performance.

Thanks in advance 🙂

Best Answer

Make sure to disable it completely in a live environment. There's no config setting for it at this time.

Related Topic