Added slug into pools table

This commit is contained in:
nymkappa
2022-03-24 19:44:22 +09:00
parent acba3bbf07
commit 884e3efc19
2 changed files with 21 additions and 5 deletions

View File

@@ -6,7 +6,7 @@ import logger from '../logger';
const sleep = (ms: number) => new Promise(res => setTimeout(res, ms));
class DatabaseMigration {
private static currentVersion = 16;
private static currentVersion = 17;
private queryTimeout = 120000;
private statisticsAddedIndexed = false;
@@ -180,6 +180,10 @@ class DatabaseMigration {
await this.$executeQuery(connection, 'TRUNCATE hashrates;'); // Need to re-index because we changed timestamps
}
if (databaseSchemaVersion < 17 && isBitcoin === true) {
await this.$executeQuery(connection, 'ALTER TABLE `pools` ADD `slug` CHAR(50) NULL');
}
connection.release();
} catch (e) {
connection.release();