File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -162,6 +162,7 @@ DELETE FROM ps_untyped;
162162DELETE FROM ps_updated_rows;
163163DELETE FROM ps_kv WHERE key != 'client_id';
164164DELETE FROM ps_sync_state;
165+ DELETE FROM ps_stream_subscriptions;
165166" ,
166167 ) ?;
167168
Original file line number Diff line number Diff line change @@ -648,4 +648,18 @@ void main() {
648648 }
649649 ]));
650650 });
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+ });
651665}
You can’t perform that action at this time.
0 commit comments