It’s nice and simple to create a database if it doesn’t already exist, via:
if (!context.DatabaseExists())
{
// Create the local database.
context.CreateDatabase();
}
But if a new table is added as part of an upgrade, is there anyway to do an in-place upgrade of the database on the phone to match the schema as if it had just been created?
You can use the DatabaseSchemaUpdater class, see this walkthrough: http://msdn.microsoft.com/en-us/library/hh394022(v=VS.92).aspx