Merge pull request #1112 from nymkappa/feature/index-added-field
INDEX 'added' in statistics table
This commit is contained in:
commit
cee52e69f1
@ -3,7 +3,7 @@ import { DB } from '../database';
|
||||
import logger from '../logger';
|
||||
|
||||
class DatabaseMigration {
|
||||
private static currentVersion = 1;
|
||||
private static currentVersion = 2;
|
||||
private queryTimeout = 120000;
|
||||
|
||||
constructor() { }
|
||||
@ -171,6 +171,10 @@ class DatabaseMigration {
|
||||
queries.push(`INSERT INTO state VALUES('last_elements_block', 0, NULL);`);
|
||||
}
|
||||
|
||||
if (version < 2) {
|
||||
queries.push(`CREATE INDEX IF NOT EXISTS added ON statistics (added);`);
|
||||
}
|
||||
|
||||
return queries;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user