Index blocks.blockTimestamp

This commit is contained in:
nymkappa 2022-03-08 17:10:29 +01:00
parent 39f1f4c05a
commit 26ee4204ac
No known key found for this signature in database
GPG Key ID: E155910B16E8BD04

View File

@ -140,6 +140,10 @@ class DatabaseMigration {
await this.$executeQuery(connection, 'ALTER TABLE `hashrates` ADD UNIQUE `hashrate_timestamp_pool_id` (`hashrate_timestamp`, `pool_id`)'); await this.$executeQuery(connection, 'ALTER TABLE `hashrates` ADD UNIQUE `hashrate_timestamp_pool_id` (`hashrate_timestamp`, `pool_id`)');
} }
if (databaseSchemaVersion < 10 && isBitcoin === true) {
await this.$executeQuery(connection, 'ALTER TABLE `blocks` ADD INDEX `blockTimestamp` (`blockTimestamp`)');
}
connection.release(); connection.release();
} catch (e) { } catch (e) {
connection.release(); connection.release();