From 727208ff84ef856b7cf7704f6326c4c56205dc67 Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Thu, 4 Apr 2024 10:57:54 +0900 Subject: [PATCH] [migration] re-index hashrates and difficulty_adjustments --- backend/src/api/database-migration.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/src/api/database-migration.ts b/backend/src/api/database-migration.ts index ae68582af..278cd2631 100644 --- a/backend/src/api/database-migration.ts +++ b/backend/src/api/database-migration.ts @@ -652,6 +652,10 @@ class DatabaseMigration { await this.$executeQuery('ALTER TABLE `prices` ADD `THB` float DEFAULT "-1"'); 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.updateToSchemaVersion(75); }