Merge branch 'master' into nymkappa/bugfix/update-log-indexer

This commit is contained in:
wiz authored and GitHub committed 2022-07-11 18:01:15 +02:00
commit c888d59368
33 files changed
+301 -248

No files matched your search

+7 -1
View File
@@ -4,7 +4,7 @@ import logger from '../logger';
import { Common } from './common';
class DatabaseMigration {
private static currentVersion = 27;
private static currentVersion = 28;
private queryTimeout = 120000;
private statisticsAddedIndexed = false;
private uniqueLogs: string[] = [];
@@ -274,6 +274,12 @@ class DatabaseMigration {
await this.$executeQuery('ALTER TABLE `lightning_stats` ADD med_base_fee_mtokens bigint(20) unsigned NOT NULL DEFAULT "0"');
}
if (databaseSchemaVersion < 28 && isBitcoin === true) {
await this.$executeQuery(`TRUNCATE lightning_stats`);
await this.$executeQuery(`TRUNCATE node_stats`);
await this.$executeQuery(`ALTER TABLE lightning_stats MODIFY added DATE`);
}
} catch (e) {
throw e;
}