From 8b58ce5a87e0be4b88b4bfd6c8a88cb975fce1ad Mon Sep 17 00:00:00 2001 From: yse Date: Mon, 11 Nov 2024 10:39:12 +0100 Subject: [PATCH] fix: set UNQIUE constraint on sync_state record_id --- lib/core/src/persist/migrations.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/src/persist/migrations.rs b/lib/core/src/persist/migrations.rs index 5b3a52016..31b88d6e3 100644 --- a/lib/core/src/persist/migrations.rs +++ b/lib/core/src/persist/migrations.rs @@ -185,7 +185,7 @@ pub(crate) fn current_migrations() -> Vec<&'static str> { ", "CREATE TABLE IF NOT EXISTS sync_state( data_id TEXT NOT NULL PRIMARY KEY, - record_id TEXT NOT NULL, + record_id TEXT NOT NULL UNIQUE, record_revision INTEGER NOT NULL ) STRICT;", "CREATE TABLE IF NOT EXISTS sync_settings(