From 4ea8acac05538fe70be20430a5d27a2a37155868 Mon Sep 17 00:00:00 2001 From: Ralf Kistner Date: Mon, 6 Jan 2025 14:30:13 +0200 Subject: [PATCH] Fix issue with deleting $local bucket on reconnect. --- packages/powersync_core/lib/src/bucket_storage.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/powersync_core/lib/src/bucket_storage.dart b/packages/powersync_core/lib/src/bucket_storage.dart index 2666ba15..804a278c 100644 --- a/packages/powersync_core/lib/src/bucket_storage.dart +++ b/packages/powersync_core/lib/src/bucket_storage.dart @@ -33,7 +33,7 @@ class BucketStorage { Future> getBucketStates() async { final rows = await select( - 'SELECT name as bucket, cast(last_op as TEXT) as op_id FROM ps_buckets WHERE pending_delete = 0'); + 'SELECT name as bucket, cast(last_op as TEXT) as op_id FROM ps_buckets WHERE pending_delete = 0 AND name != \'\$local\''); return [ for (var row in rows) BucketState(bucket: row['bucket'], opId: row['op_id'])