Skip to content
Permalink
Browse files

fix(streams_issues): delete unneed relation.

  • Loading branch information...
h13i32maru committed Aug 25, 2019
1 parent 048192b commit 08bcf5c9971a094c34d97ae593898fa1ea04029e
Showing with 3 additions and 4 deletions.
  1. +1 −2 src/DB/StreamsIssuesTable.js
  2. +1 −1 src/Electron/StreamCenter.js
  3. +1 −1 src/Electron/SystemStreamCenter.js
@@ -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)
`);
}

@@ -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))
@@ -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))

0 comments on commit 08bcf5c

Please sign in to comment.
You can’t perform that action at this time.