allow clearing sync mappings

This commit is contained in:
fyears
2021-11-07 16:02:03 +08:00
parent d7d1c47e2a
commit b7a0376a0f
2 changed files with 30 additions and 1 deletions
+5
View File
@@ -276,6 +276,11 @@ export const getSyncMetaMappingByRemoteKeyS3 = async (
throw Error("something bad in sync meta mapping!");
};
export const clearAllSyncMetaMapping = async (db: lf.DatabaseConnection) => {
const tbl = db.getSchema().table(DEFAULT_TBL_SYNC_MAPPING);
await db.delete().from(tbl).exec();
};
export const insertSyncPlanRecord = async (
db: lf.DatabaseConnection,
syncPlan: SyncPlanType