You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem?
Migration 063 fails on staging due to a UniqueViolation error caused by the model_config sequence being out of sync with the existing IDs in the database, leading to primary key conflicts.
Describe the solution you'd like
Reset the sequence to max(id) before the INSERT using setval(pg_get_serial_sequence(...), MAX(id)).
Implement the fix in PR: fix/migration-063-sequence-reset.
Original issue
Describe the bug
A clear and concise description of what the bug is.
Migration 063 (seed stt/tts model_config rows) fails on staging with UniqueViolation: duplicate key value violates unique constraint "model_config_pkey" (Key id=20 already exists). The model_config sequence is behind the actual max id in the DB, so auto-generated ids collide with existing rows.
To Reproduce
Steps to reproduce the behavior:
Have a staging DB where model_config has rows with id >= 20 (sequence not in sync)
Expected behavior
A clear and concise description of what you expected to happen.
Migration 063 runs cleanly and seeds all 10 STT/TTS model config rows.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Fix: reset sequence to max(id) before the INSERT using setval(pg_get_serial_sequence(...), MAX(id)). PR: fix/migration-063-sequence-reset.
Is your feature request related to a problem?
Migration 063 fails on staging due to a UniqueViolation error caused by the model_config sequence being out of sync with the existing IDs in the database, leading to primary key conflicts.
Describe the solution you'd like
setval(pg_get_serial_sequence(...), MAX(id)).fix/migration-063-sequence-reset.Original issue
Describe the bug
A clear and concise description of what the bug is.
Migration 063 (seed stt/tts model_config rows) fails on staging with UniqueViolation: duplicate key value violates unique constraint "model_config_pkey" (Key id=20 already exists). The model_config sequence is behind the actual max id in the DB, so auto-generated ids collide with existing rows.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Migration 063 runs cleanly and seeds all 10 STT/TTS model config rows.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Fix: reset sequence to max(id) before the INSERT using setval(pg_get_serial_sequence(...), MAX(id)). PR: fix/migration-063-sequence-reset.