-
-
Notifications
You must be signed in to change notification settings - Fork 300
Closed
Labels
Description
Migrated issue, originally created by Michael Bayer (@zzzeek)
from alembic.migration import MigrationContext
from alembic.operations import Operations
from sqlalchemy import create_engine, literal_column
from sqlalchemy.sql import table, column
import sqlalchemy as sa
engine = create_engine("mysql://")
ctx = MigrationContext.configure(engine, opts=dict(as_sql=True))
op = Operations(ctx)
test = table('test',
column('id', sa.Integer),
column('date', sa.Date)
)
op.bulk_insert(test, [
{'id': 1,
'date': op.inline_literal('2014-01-01', type_=sa.String),
}
])
it's wrapping the _literal_bindparam inside of another one.