mirror of
https://github.com/mempool/mempool.git
synced 2025-09-25 21:47:16 +02:00
Add db migration to remove bad price data
This commit is contained in:
@@ -7,7 +7,7 @@ import cpfpRepository from '../repositories/CpfpRepository';
|
|||||||
import { RowDataPacket } from 'mysql2';
|
import { RowDataPacket } from 'mysql2';
|
||||||
|
|
||||||
class DatabaseMigration {
|
class DatabaseMigration {
|
||||||
private static currentVersion = 100;
|
private static currentVersion = 101;
|
||||||
private queryTimeout = 3600_000;
|
private queryTimeout = 3600_000;
|
||||||
private statisticsAddedIndexed = false;
|
private statisticsAddedIndexed = false;
|
||||||
private uniqueLogs: string[] = [];
|
private uniqueLogs: string[] = [];
|
||||||
@@ -1299,6 +1299,10 @@ class DatabaseMigration {
|
|||||||
queries.push(`DELETE FROM state WHERE name = 'last_weekly_hashrates_indexing'`);
|
queries.push(`DELETE FROM state WHERE name = 'last_weekly_hashrates_indexing'`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (version < 101) {
|
||||||
|
queries.push(`DELETE FROM prices WHERE USD = -1`);
|
||||||
|
}
|
||||||
|
|
||||||
return queries;
|
return queries;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user