Fix DB migration 54 breaking liquid
This commit is contained in:
parent
da3446f522
commit
4d7c69dd73
@ -464,7 +464,7 @@ class DatabaseMigration {
|
|||||||
await this.$executeQuery('DROP TABLE IF EXISTS `transactions`');
|
await this.$executeQuery('DROP TABLE IF EXISTS `transactions`');
|
||||||
await this.$executeQuery('DROP TABLE IF EXISTS `cpfp_clusters`');
|
await this.$executeQuery('DROP TABLE IF EXISTS `cpfp_clusters`');
|
||||||
await this.updateToSchemaVersion(52);
|
await this.updateToSchemaVersion(52);
|
||||||
} catch(e) {
|
} catch (e) {
|
||||||
logger.warn('' + (e instanceof Error ? e.message : e));
|
logger.warn('' + (e instanceof Error ? e.message : e));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -476,9 +476,11 @@ class DatabaseMigration {
|
|||||||
|
|
||||||
if (databaseSchemaVersion < 54) {
|
if (databaseSchemaVersion < 54) {
|
||||||
this.uniqueLog(logger.notice, `'prices' table has been truncated`);
|
this.uniqueLog(logger.notice, `'prices' table has been truncated`);
|
||||||
this.uniqueLog(logger.notice, `'blocks_prices' table has been truncated`);
|
|
||||||
await this.$executeQuery(`TRUNCATE prices`);
|
await this.$executeQuery(`TRUNCATE prices`);
|
||||||
await this.$executeQuery(`TRUNCATE blocks_prices`);
|
if (isBitcoin === true) {
|
||||||
|
this.uniqueLog(logger.notice, `'blocks_prices' table has been truncated`);
|
||||||
|
await this.$executeQuery(`TRUNCATE blocks_prices`);
|
||||||
|
}
|
||||||
await this.updateToSchemaVersion(54);
|
await this.updateToSchemaVersion(54);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -604,7 +606,7 @@ class DatabaseMigration {
|
|||||||
queries.push(`INSERT INTO state(name, number, string) VALUES ('last_hashrates_indexing', 0, NULL)`);
|
queries.push(`INSERT INTO state(name, number, string) VALUES ('last_hashrates_indexing', 0, NULL)`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (version < 9 && isBitcoin === true) {
|
if (version < 9 && isBitcoin === true) {
|
||||||
queries.push(`INSERT INTO state(name, number, string) VALUES ('last_weekly_hashrates_indexing', 0, NULL)`);
|
queries.push(`INSERT INTO state(name, number, string) VALUES ('last_weekly_hashrates_indexing', 0, NULL)`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user