mirror of
https://github.com/mempool/mempool.git
synced 2025-04-12 22:09:24 +02:00
Merge pull request #1308 from nymkappa/bugfix/fix-db-migration
Truncate hashrates table only for bitcoin (db migration v9)
This commit is contained in:
commit
beae88778b
@ -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…
x
Reference in New Issue
Block a user