Skip to content

Commit b4f208f

Browse files
authored
Merge pull request #94 from powersync-ja/fix-write-checkpoint-handling
Avoid deleting the $local bucket on connect()
2 parents 3c4eb72 + bd4afb9 commit b4f208f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/commonMain/kotlin/com/powersync/bucket/BucketStorageImpl.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ internal class BucketStorageImpl(
134134

135135
override suspend fun getBucketStates(): List<BucketState> =
136136
db.getAll(
137-
"SELECT name AS bucket, CAST(last_op AS TEXT) AS op_id FROM ${InternalTable.BUCKETS} WHERE pending_delete = 0",
137+
"SELECT name AS bucket, CAST(last_op AS TEXT) AS op_id FROM ${InternalTable.BUCKETS} WHERE pending_delete = 0 AND name != '\$local'",
138138
mapper = { cursor ->
139139
BucketState(
140140
bucket = cursor.getString(0)!!,

0 commit comments

Comments
 (0)