mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
CI's "Apply database migrations" failed with asyncpg UnsafeNewEnumValueUsageError: alembic runs the whole upgrade in a single transaction, so migration 039's INSERT used 'grok' in the same transaction that 038 added it — which Postgres forbids. Splitting into two migration files did not help (one transaction spans both). Wrap the ALTER TYPE ADD VALUE in op.get_context().autocommit_block() so the value commits before 039 (and any later migration) uses it. Still renders in offline --sql, so the enum-migration-parity test is unaffected.