-- Remove obsolete enum values '4b' and '27b' from TranslationModel
-- The only valid value is 'gemini-3-flash-preview'

-- Update any rows that might still reference old values
UPDATE "translation_jobs" SET "model" = 'gemini-3-flash-preview' WHERE "model" IN ('4b', '27b');

-- Recreate the enum with only the valid value
ALTER TYPE "TranslationModel" RENAME TO "TranslationModel_old";
CREATE TYPE "TranslationModel" AS ENUM ('gemini-3-flash-preview');
ALTER TABLE "translation_jobs" ALTER COLUMN "model" TYPE "TranslationModel" USING "model"::text::"TranslationModel";
DROP TYPE "TranslationModel_old";
