From f7de9555a94dc1eb6f3081b24be0917255846f66 Mon Sep 17 00:00:00 2001 From: sirius0xdev Date: Tue, 7 Jul 2026 18:28:02 -0400 Subject: [PATCH] Fix migration: drop redundant explicit CREATE TYPE (collides with sa.Enum name=) --- alembic/versions/001_initial.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/alembic/versions/001_initial.py b/alembic/versions/001_initial.py index 7cc2207..d6bdbcf 100644 --- a/alembic/versions/001_initial.py +++ b/alembic/versions/001_initial.py @@ -17,13 +17,8 @@ depends_on = None def upgrade() -> None: - # Enums - op.execute("CREATE TYPE feed_source_type AS ENUM ('rss', 'gdel-t2', 'social', 'earthquake', 'disaster', 'weather', 'fire', 'satellite')") - op.execute("CREATE TYPE event_source_type AS ENUM ('rss', 'gdel-t2', 'social', 'earthquake', 'disaster', 'weather', 'fire', 'satellite')") - op.execute("CREATE TYPE sentiment_label AS ENUM ('positive', 'neutral', 'negative')") - op.execute("CREATE TYPE entity_type AS ENUM ('person', 'organization', 'location', 'topic', 'asset')") - op.execute("CREATE TYPE alert_type AS ENUM ('entity_mention', 'sentiment_shift', 'geo_proximity', 'keyword_match', 'threshold', 'anomaly')") - op.execute("CREATE TYPE alert_severity AS ENUM ('low', 'medium', 'high', 'critical')") + # Enums are created implicitly by the sa.Enum(name=...) columns below. + # (Explicit CREATE TYPE here would collide with SQLAlchemy's own DDL.) # Extensions op.execute("CREATE EXTENSION IF NOT EXISTS postgis")