From 18b1fba7357c9f8ddba3e9788c784630ae32b2a6 Mon Sep 17 00:00:00 2001 From: Ryan Rymarczyk Date: Sun, 29 Dec 2024 07:54:38 -0500 Subject: [PATCH] FIX: TempEventCompare max primary key error (#470) This change restarts the identity on the TempEventCompare table to avoid a "maximum value of sequence" error. --- src/lamp_py/performance_manager/l0_gtfs_rt_events.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lamp_py/performance_manager/l0_gtfs_rt_events.py b/src/lamp_py/performance_manager/l0_gtfs_rt_events.py index 70c8755f..d2a62e83 100644 --- a/src/lamp_py/performance_manager/l0_gtfs_rt_events.py +++ b/src/lamp_py/performance_manager/l0_gtfs_rt_events.py @@ -281,7 +281,7 @@ def build_temp_events(events: pandas.DataFrame, db_manager: DatabaseManager) -> events = events.fillna(numpy.nan).replace([numpy.nan], [None]) # truncate temp_event_compare table and insert all event records - db_manager.truncate_table(TempEventCompare) + db_manager.truncate_table(TempEventCompare, restart_identity=True) db_manager.execute_with_data( sa.insert(TempEventCompare.__table__), events,