From 3707763e30607494aa8271d0409c683b70245649 Mon Sep 17 00:00:00 2001 From: Mononaut Date: Mon, 5 Aug 2024 16:03:22 +0000 Subject: [PATCH] fix db migration 75 on liquid --- backend/src/api/database-migration.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/backend/src/api/database-migration.ts b/backend/src/api/database-migration.ts index 5768cd68d..69fb76884 100644 --- a/backend/src/api/database-migration.ts +++ b/backend/src/api/database-migration.ts @@ -653,9 +653,11 @@ class DatabaseMigration { await this.$executeQuery('ALTER TABLE `prices` ADD `TRY` float DEFAULT "-1"'); await this.$executeQuery('ALTER TABLE `prices` ADD `ZAR` float DEFAULT "-1"'); - await this.$executeQuery('TRUNCATE hashrates'); - await this.$executeQuery('TRUNCATE difficulty_adjustments'); - await this.$executeQuery(`UPDATE state SET string = NULL WHERE name = 'pools_json_sha'`); + if (isBitcoin === true) { + await this.$executeQuery('TRUNCATE hashrates'); + await this.$executeQuery('TRUNCATE difficulty_adjustments'); + await this.$executeQuery(`UPDATE state SET string = NULL WHERE name = 'pools_json_sha'`); + } await this.updateToSchemaVersion(75); }