Merge pull request #2743 from mempool/nymkappa/bugfix/block-timestamp

Disable ON UPDATE for blocks.blockTimestamp field
This commit is contained in:
wiz 2022-11-29 16:39:53 +09:00 committed by GitHub
commit c682a8e3ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,7 +4,7 @@ import logger from '../logger';
import { Common } from './common';
class DatabaseMigration {
private static currentVersion = 45;
private static currentVersion = 46;
private queryTimeout = 900_000;
private statisticsAddedIndexed = false;
private uniqueLogs: string[] = [];
@ -369,6 +369,10 @@ class DatabaseMigration {
if (databaseSchemaVersion < 45 && isBitcoin === true) {
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`);
}
}
/**