Making database schema changes using Microsoft Sync framework without losing any tracking table data

前端 未结 2 1906
死守一世寂寞
死守一世寂寞 2021-02-11 07:43

I am using Microsoft Synch Service Framework 4.0 for synching Sql server Database tables with SqlLite Database on the Ipad side.

Before making any Database schema change

2条回答
  •  执笔经年
    2021-02-11 08:20

    Lets say I have one table "User" that I want to synch. A tracking table will be created "User_tracking" and some synch information will be present in it after synching.

    WHen I make any DB changes, this Tracking table "User_tracking" will be deleted AND the tracking info. will be lost during the Deprovisioning- Provisioning process.

    My workaround: Before Deprovisioning, I will write a script to copy all the "User_tracking" data into another temporary table "User_tracking_1". so all the existing tracking info will be stored in "User_tracking_1". WHen I reprovision the table, a new trackin table "User_Tracking" will be created. After Reprovisioning, I will copy the data from table "User_tracking_1" to "User_Tracking" and then delete the contents from table "User_Tracking_1". UserTracking info will be restored.

    Is this the right approach...

提交回复
热议问题