Skip to content

Commit 08bcf5c

Browse files
committed
fix(streams_issues): delete unneed relation.
1 parent 048192b commit 08bcf5c

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/DB/StreamsIssuesTable.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@ export class StreamsIssuesTable {
1717
await this._unlinkMismatchIssues(issues);
1818

1919
// see IssuesTable
20-
const max = Config.databaseMax;
2120
await DB.exec(`
2221
delete from
2322
streams_issues
2423
where
25-
issue_id in (select id from issues order by updated_at desc limit ${max}, 1000)
24+
issue_id not in (select id from issues)
2625
`);
2726
}
2827

src/Electron/StreamCenter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export class StreamCenter {
3232
, count(1) as count
3333
from
3434
streams_issues as t1
35-
left join
35+
inner join
3636
issues as t2 on t1.issue_id = t2.id
3737
where
3838
((read_at is null) or (updated_at > read_at))

src/Electron/SystemStreamCenter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export class SystemStreamCenter {
4141
, count(1) as count
4242
from
4343
streams_issues as t1
44-
left join
44+
inner join
4545
issues as t2 on t1.issue_id = t2.id
4646
where
4747
((read_at is null) or (updated_at > read_at))

0 commit comments

Comments
 (0)