1. Michael Bayer
  2. alembic
  3. Issues


Issue #138 resolved

mysql SET

Tomasz Święcicki
created an issue

I have column like:

test = db.Column(
    mysql.SET('t1', 't2', 't3'), default='t1,t2,t3', nullable=False

then after autogenerate I got this:

op.add_column('target_set_location_country', sa.Column('test', mysql.SET('t1', 't2', 't3'), nullable=False))

It's strange because alembic should generate:

mysql.SET("'t1'", "'t2'", "'t3'")

SQL (doesn't work):

source SET(t1,t2,t3) DEFAULT 't1,t2,t3' NOT NULL,

SQL (correct):

source SET('t1','t2','t3') DEFAULT 't1,t2,t3' NOT NULL,

So, after autogenerate I have to change this manually. I tried to add ' to models, but it does not worked.

Comments (2)

  1. Log in to comment