From 75c7986e6cc9677e3f2044eb274738a5645e348d Mon Sep 17 00:00:00 2001 From: Prashant Vasudevan <71649489+vprashrex@users.noreply.github.com> Date: Mon, 25 May 2026 08:16:07 +0530 Subject: [PATCH] hotfix: reset model_config sequence before seeding in migration 063 --- .../app/alembic/versions/063_seed_stt_tts_model_configs.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/app/alembic/versions/063_seed_stt_tts_model_configs.py b/backend/app/alembic/versions/063_seed_stt_tts_model_configs.py index 7c6405f3a..23070924a 100644 --- a/backend/app/alembic/versions/063_seed_stt_tts_model_configs.py +++ b/backend/app/alembic/versions/063_seed_stt_tts_model_configs.py @@ -78,7 +78,10 @@ def upgrade(): "CREATE INDEX ix_model_config_output_modalities ON global.model_config USING gin (output_modalities)" ) - # 6. Seed rows — pricing per 1M tokens (USD): response/batch = text i/o; audio = audio-modal i/o + op.execute( + "SELECT setval(pg_get_serial_sequence('global.model_config', 'id'), MAX(id)) FROM global.model_config" + ) + op.execute( """ INSERT INTO global.model_config