Skip to content

Commit 18aed38

Browse files
committed
fix: increment latest ID by 1 on migration
part of freqtrade#12825
1 parent e6db0ab commit 18aed38

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

freqtrade/commands/db_commands.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ def start_convert_db(args: dict[str, Any]) -> None:
6666

6767
set_sequence_ids(
6868
session_target.get_bind(),
69-
trade_id=max_trade_id,
70-
order_id=max_order_id,
71-
pairlock_id=max_pairlock_id,
72-
kv_id=max_kv_id,
73-
custom_data_id=max_custom_data_id,
69+
trade_id=(max_trade_id or 0) + 1,
70+
order_id=(max_order_id or 0) + 1,
71+
pairlock_id=(max_pairlock_id or 0) + 1,
72+
kv_id=(max_kv_id or 0) + 1,
73+
custom_data_id=(max_custom_data_id or 0) + 1,
7474
)
7575

7676
logger.info(

0 commit comments

Comments
 (0)