Fix migration: drop redundant explicit CREATE TYPE (collides with sa.Enum name=)
Some checks failed
build-and-deploy / build (push) Failing after 19s

This commit is contained in:
sirius0xdev 2026-07-07 18:28:02 -04:00
parent 0a6da2f9c1
commit f7de9555a9
No known key found for this signature in database

View file

@ -17,13 +17,8 @@ depends_on = None
def upgrade() -> None: def upgrade() -> None:
# Enums # Enums are created implicitly by the sa.Enum(name=...) columns below.
op.execute("CREATE TYPE feed_source_type AS ENUM ('rss', 'gdel-t2', 'social', 'earthquake', 'disaster', 'weather', 'fire', 'satellite')") # (Explicit CREATE TYPE here would collide with SQLAlchemy's own DDL.)
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')")
# Extensions # Extensions
op.execute("CREATE EXTENSION IF NOT EXISTS postgis") op.execute("CREATE EXTENSION IF NOT EXISTS postgis")