Merge pull request #2743 from mempool/nymkappa/bugfix/block-timestamp
Disable ON UPDATE for blocks.blockTimestamp field
This commit is contained in:
commit
c682a8e3ff
@ -4,7 +4,7 @@ import logger from '../logger';
|
|||||||
import { Common } from './common';
|
import { Common } from './common';
|
||||||
|
|
||||||
class DatabaseMigration {
|
class DatabaseMigration {
|
||||||
private static currentVersion = 45;
|
private static currentVersion = 46;
|
||||||
private queryTimeout = 900_000;
|
private queryTimeout = 900_000;
|
||||||
private statisticsAddedIndexed = false;
|
private statisticsAddedIndexed = false;
|
||||||
private uniqueLogs: string[] = [];
|
private uniqueLogs: string[] = [];
|
||||||
@ -369,6 +369,10 @@ class DatabaseMigration {
|
|||||||
if (databaseSchemaVersion < 45 && isBitcoin === true) {
|
if (databaseSchemaVersion < 45 && isBitcoin === true) {
|
||||||
await this.$executeQuery('ALTER TABLE `blocks_audits` ADD fresh_txs JSON DEFAULT "[]"');
|
await this.$executeQuery('ALTER TABLE `blocks_audits` ADD fresh_txs JSON DEFAULT "[]"');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (databaseSchemaVersion < 46) {
|
||||||
|
await this.$executeQuery(`ALTER TABLE blocks MODIFY blockTimestamp timestamp NOT NULL DEFAULT 0`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user