Move table re-index to own migrations
This commit is contained in:
parent
13aa62878e
commit
1c55eef276
@ -7,7 +7,7 @@ import cpfpRepository from '../repositories/CpfpRepository';
|
|||||||
import { RowDataPacket } from 'mysql2';
|
import { RowDataPacket } from 'mysql2';
|
||||||
|
|
||||||
class DatabaseMigration {
|
class DatabaseMigration {
|
||||||
private static currentVersion = 78;
|
private static currentVersion = 81;
|
||||||
private queryTimeout = 3600_000;
|
private queryTimeout = 3600_000;
|
||||||
private statisticsAddedIndexed = false;
|
private statisticsAddedIndexed = false;
|
||||||
private uniqueLogs: string[] = [];
|
private uniqueLogs: string[] = [];
|
||||||
@ -669,6 +669,21 @@ class DatabaseMigration {
|
|||||||
await this.$executeQuery('ALTER TABLE `prices` CHANGE `time` `time` datetime NOT NULL');
|
await this.$executeQuery('ALTER TABLE `prices` CHANGE `time` `time` datetime NOT NULL');
|
||||||
await this.updateToSchemaVersion(78);
|
await this.updateToSchemaVersion(78);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (databaseSchemaVersion < 79 && isBitcoin === true) {
|
||||||
|
await this.$executeQuery('TRUNCATE hashrates');
|
||||||
|
await this.updateToSchemaVersion(79);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (databaseSchemaVersion < 80 && isBitcoin === true) {
|
||||||
|
await this.$executeQuery('TRUNCATE difficulty_adjustments');
|
||||||
|
await this.updateToSchemaVersion(80);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (databaseSchemaVersion < 81 && isBitcoin === true) {
|
||||||
|
await this.$executeQuery(`UPDATE state SET string = NULL WHERE name = 'pools_json_sha'`);
|
||||||
|
await this.updateToSchemaVersion(81);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user