We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6d6863f commit 4e91fa1Copy full SHA for 4e91fa1
2 files changed
crates/core/src/view_admin.rs
@@ -162,6 +162,7 @@ DELETE FROM ps_untyped;
162
DELETE FROM ps_updated_rows;
163
DELETE FROM ps_kv WHERE key != 'client_id';
164
DELETE FROM ps_sync_state;
165
+DELETE FROM ps_stream_subscriptions;
166
",
167
)?;
168
dart/test/sync_stream_test.dart
@@ -648,4 +648,18 @@ void main() {
648
}
649
]));
650
});
651
+
652
+ syncTest('clearing database clears subscriptions', (_) {
653
+ control(
654
+ 'subscriptions',
655
+ json.encode({
656
+ 'subscribe': {
657
+ 'stream': {'name': 'a'},
658
+ }
659
+ }),
660
+ );
661
+ expect(db.select('select * from ps_stream_subscriptions'), isNotEmpty);
662
+ db.execute('select powersync_clear(0);');
663
+ expect(db.select('select * from ps_stream_subscriptions'), isEmpty);
664
+ });
665
0 commit comments