Hi Michael,

Thank you very much for your reply. I can confirm that upgrading to 
SQLAlchemy 0.9 solved the problem.

Kind Regards,
Mike

On Tuesday, February 4, 2014 2:42:05 PM UTC, Michael Bayer wrote:
>
> we’ve had a lot of issues with repr() of Enum and they should be fixed in 
> recent versions of SQLAlchemy, in particular the “name” render appears to 
> work as of the 0.8 series.
>
> With 0.7.4 you’re at the very bottom of compatibility w/ alembic, so if 
> you can’t upgrade you can do a workaround via render_item: 
> http://alembic.readthedocs.org/en/latest/api.html#alembic.environment.EnvironmentContext.configure.params.render_item
>
>
>
> On Feb 4, 2014, at 9:20 AM, Michael Mulqueen 
> <mic...@mulqueen.me.uk<javascript:>> 
> wrote:
>
> Sorry, I should have noted the versions earlier.
>
> SQLAlchemy: 0.7.4
> Alembic: 0.6.3
> Python: 2.7.3
>
> Mike
>
> On Tuesday, February 4, 2014 1:56:57 PM UTC, Michael Mulqueen wrote:
>>
>> I'm hoping someone can help with this. My code is all built on SA's 
>> declarative base.
>>
>> What's happening is that from my code:
>>
>> disposition = Column(Enum("Release", "Rework", name="disposition_enum"))
>>
>>
>> Alembic autogenerate is producing this:
>>
>> sa.Column('disposition', sa.Enum('Release', 'Rework'), nullable=True),
>>
>> The name is getting lost somewhere and this makes the upgrade fail 
>> because Postgres requires a name. This is the first revision, so no 
>> altering is going on, just creating new tables etc.
>>
>> Does anyone have any ideas? Am I doing something wrong? I could go and 
>> manually set the names in the generated code, but that kind of defeats the 
>> point.
>>
>> Thanks,
>> Mik 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy-alembic" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy-alembic+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to