diff --git a/backend/src/api/database-migration.ts b/backend/src/api/database-migration.ts index c66148fe0..38ceb250b 100644 --- a/backend/src/api/database-migration.ts +++ b/backend/src/api/database-migration.ts @@ -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)');