This project has moved and is read-only. For the latest updates, please go here.

How to Upgrade DB? and tombstone event...

Jan 26, 2011 at 6:57 AM

I was searching for some solution to test DB upgrade scenario and i found a discussion by MDMiller, now i have some questions in my mind

What if i have more than 1000 records in my previous version of DB and i want to convert in to new version of DB as you described now as 1000 items may take some time to convert and save and by default if some process at startup takes more than 5 secs WP7 auto kill that process and stops the app from launch. I have found the background threads are also blocked if they remain unresponsive for a particular time.

Tell me what approach to use in this scenario and will upgrade be tombstone safe? what if app goes paused due to some call or event during conversion process?

Please help me because i want to publish my app on marketplace very soon and i am very concerned about upgrade process.


Jan 26, 2011 at 1:20 PM

This is obviously something that could happen any time. What you'd want to do is either write an indicator yourself, or use a file through Sterling, to indicate when the migration is complete.

You always check to see if that "file complete" is there. If not, you migrate. If it fails in the middle, and you come back, you migrate again. It's up to you to let the user know something is happening that is going to take a little longer than normal, so you can put of a progress display , etc. Once the migration succeeds, you mark the file and move forward with the new database.

Jun 11, 2011 at 7:41 AM

I've posted a prototype solution for upgrading

have a look