From 131c1aaf13e3f53894d5ae38ad955da963f3f570 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 15 Feb 2026 18:05:33 +0100 Subject: [PATCH] chore: clarify set_sequence_id's docstring --- freqtrade/persistence/migrations.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/freqtrade/persistence/migrations.py b/freqtrade/persistence/migrations.py index 2e5971c70..c5f222122 100644 --- a/freqtrade/persistence/migrations.py +++ b/freqtrade/persistence/migrations.py @@ -49,6 +49,17 @@ def get_last_sequence_ids(engine, trade_back_name: str, order_back_name: str): def set_sequence_ids(engine, order_id, trade_id, pairlock_id=None, kv_id=None, custom_data_id=None): + """ + Set sequence ids to the given values. + The id's given should be the next id to use, so the current max id + 1 - or current id + if using nextval before migration. + :param engine: SQLAlchemy engine + :param order_id: value to set for orders_id_seq + :param trade_id: value to set for trades_id_seq + :param pairlock_id: value to set for pairlocks_id_seq (optional) + :param kv_id: value to set for KeyValueStore_id_seq (optional) + :param custom_data_id: value to set for trade_custom_data_id_seq (optional) + """ if engine.name == "postgresql": with engine.begin() as connection: if order_id: