Skip to content

Commit

Permalink
fix(streams_issues): delete unneed relation.
Browse files Browse the repository at this point in the history
  • Loading branch information
h13i32maru committed Aug 25, 2019
1 parent 048192b commit 08bcf5c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/DB/StreamsIssuesTable.js
Expand Up @@ -17,12 +17,11 @@ export class StreamsIssuesTable {
await this._unlinkMismatchIssues(issues);

// see IssuesTable
const max = Config.databaseMax;
await DB.exec(`
delete from
streams_issues
where
issue_id in (select id from issues order by updated_at desc limit ${max}, 1000)
issue_id not in (select id from issues)
`);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Electron/StreamCenter.js
Expand Up @@ -32,7 +32,7 @@ export class StreamCenter {
, count(1) as count
from
streams_issues as t1
left join
inner join
issues as t2 on t1.issue_id = t2.id
where
((read_at is null) or (updated_at > read_at))
Expand Down
2 changes: 1 addition & 1 deletion src/Electron/SystemStreamCenter.js
Expand Up @@ -41,7 +41,7 @@ export class SystemStreamCenter {
, count(1) as count
from
streams_issues as t1
left join
inner join
issues as t2 on t1.issue_id = t2.id
where
((read_at is null) or (updated_at > read_at))
Expand Down

0 comments on commit 08bcf5c

Please sign in to comment.