Closed
Description
Migrated issue, originally created by Wichert Akkerman (@wichert)
I have a very simple migration:
def upgrade():
stmt = sa.text('ALTER TYPE article_type ADD VALUE IF NOT EXISTS :value')
for article_type in ['foo']:
op.execute(stmt.bindparams(value=article_type))
When running that with alembic upgrade head --sql
the bind parameter is not substituted in the generated SQL:
-- Running upgrade -> 4bd730372bac
ALTER TYPE article_type ADD VALUE IF NOT EXISTS %(value)s;