mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-02 03:32:42 +01:00
Make Lisk counters patch more robust
Summary: We need to revert this patch and we will need to re-apply it later. We can't drop the table and delete these rows as we need to run both versions for a temporary period. Test Plan: Applied it. Reviewers: epriestley, nh Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D3924
This commit is contained in:
parent
2e993f7561
commit
6cfc15ad6c
1 changed files with 4 additions and 2 deletions
|
@ -29,10 +29,12 @@ $initial_counter = max((int)$active_auto, (int)$active_max, (int)$archive_max);
|
||||||
|
|
||||||
queryfx(
|
queryfx(
|
||||||
$conn_w,
|
$conn_w,
|
||||||
'INSERT IGNORE INTO %T (counterName, counterValue)
|
'INSERT INTO %T (counterName, counterValue)
|
||||||
VALUES (%s, %d)',
|
VALUES (%s, %d)
|
||||||
|
ON DUPLICATE KEY UPDATE counterValue = %d',
|
||||||
LiskDAO::COUNTER_TABLE_NAME,
|
LiskDAO::COUNTER_TABLE_NAME,
|
||||||
$active_table->getTableName(),
|
$active_table->getTableName(),
|
||||||
|
$initial_counter + 1,
|
||||||
$initial_counter + 1);
|
$initial_counter + 1);
|
||||||
|
|
||||||
// Drop AUTO_INCREMENT from the ID column.
|
// Drop AUTO_INCREMENT from the ID column.
|
||||||
|
|
Loading…
Reference in a new issue