INDEX 'added' in statistics table

This commit is contained in:
nymkappa 2022-01-10 19:48:29 +09:00
parent d809e85dde
commit 1e78326ee4
No known key found for this signature in database
GPG Key ID: E155910B16E8BD04

View File

@ -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,11 @@ class DatabaseMigration {
queries.push(`INSERT INTO state VALUES('last_elements_block', 0, NULL);`);
}
if (version < 2) {
queries.push(`ALTER TABLE statistics
ADD INDEX added (added);`);
}
return queries;
}
}