Merge pull request #753 from elammertsma/dev

fix(database): handle duplicate podcast_status type creation gracefully
This commit is contained in:
Rohan Verma 2026-01-30 14:39:59 -08:00 committed by GitHub
commit 660492014a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -20,7 +20,11 @@ depends_on: str | Sequence[str] | None = None
def upgrade() -> None:
op.execute(
"""
CREATE TYPE podcast_status AS ENUM ('pending', 'generating', 'ready', 'failed');
DO $$ BEGIN
CREATE TYPE podcast_status AS ENUM ('pending', 'generating', 'ready', 'failed');
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
"""
)