I have a desktop application that uses an SQL Server CE 3.5 database. I can not use any other SQL Server edition. Now I'm wondering: In case of future updates to the functionality, how would I best upgrade the database (= keep current data but add new fields/tables/etc.)?
If I used one of the server editions, I'd just write an upgrade script and run it. My current idea is to do the following:
- Rename the old database file (backup)
- Copy the new database file
- Connect to both database files
- Copy all data from old to new database programmatically
This works, but the approach does not seem optimal. Is there an easier and more reliable way?