mirror of
https://github.com/mempool/mempool.git
synced 2024-11-20 10:21:52 +01:00
Truncate hashrates table only for bitcoin (db migration v9)
This commit is contained in:
parent
641fa91a48
commit
32d66c03c6
@ -133,7 +133,7 @@ class DatabaseMigration {
|
||||
await this.$executeQuery(connection, 'ALTER TABLE `hashrates` ADD `type` enum("daily", "weekly") DEFAULT "daily"');
|
||||
}
|
||||
|
||||
if (databaseSchemaVersion < 9) {
|
||||
if (databaseSchemaVersion < 9 && isBitcoin === true) {
|
||||
logger.warn(`'hashrates' table has been truncated. Re-indexing from scratch.'`);
|
||||
await this.$executeQuery(connection, 'TRUNCATE hashrates;'); // Need to re-index
|
||||
await this.$executeQuery(connection, 'ALTER TABLE `state` CHANGE `name` `name` varchar(100)');
|
||||
|
Loading…
Reference in New Issue
Block a user