reset asset sync entity on mobile and server

This commit is contained in:
shenlong-tanwen
2026-01-28 16:45:45 +05:30
parent a69baa5f6a
commit c46f723631
2 changed files with 13 additions and 1 deletions

View File

@@ -92,7 +92,12 @@ Future<void> migrateDatabaseIfNeeded(Isar db, Drift drift) async {
}
if (version < 21) {
await _addSyncEntityReset([SyncEntityType.assetExifV1]);
await _addSyncEntityReset([
SyncEntityType.assetV1,
SyncEntityType.partnerAssetV1,
SyncEntityType.albumAssetCreateV1,
SyncEntityType.albumAssetUpdateV1,
]);
}
if (targetVersion >= 12) {

View File

@@ -0,0 +1,7 @@
import { Kysely, sql } from 'kysely';
export async function up(db: Kysely<any>): Promise<void> {
await sql`DELETE FROM session_sync_checkpoint WHERE type IN ('AssetV1', 'PartnerAssetV1', 'AlbumAssetCreateV1', 'AlbumAssetUpdateV1')`.execute(db);
}
export async function down(): Promise<void> {}