Skip to content

Commit

Permalink
FIX: TempEventCompare max primary key error (#470)
Browse files Browse the repository at this point in the history
This change restarts the identity on the TempEventCompare table to avoid a "maximum value of sequence" error.
  • Loading branch information
rymarczy authored Dec 29, 2024
1 parent fc1906a commit 18b1fba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lamp_py/performance_manager/l0_gtfs_rt_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 18b1fba

Please sign in to comment.