Re: [sqlalchemy] OpenStack Glance upgrade script breaks with SQLAlchemy 1.1.11 but not 1.0.12

2017-10-12 Thread Byron Yi
Thanks Mike. Glad to know it’s been fixed.

Best,
Bairen

> On 12 Oct 2017, at 21:54, Mike Bayer <mike...@zzzcomputing.com> wrote:
> 
> Your migrate is out of date.  this was fixed one year ago:
> 
> https://github.com/openstack/sqlalchemy-migrate/commit/e9175a37ce0b0b0e87ad728c8a6a10bed100065b
> 
> 
> 
> On Thu, Oct 12, 2017 at 9:51 AM, Mike Bayer <mike...@zzzcomputing.com> wrote:
>> On Thu, Oct 12, 2017 at 8:32 AM, Byron Yi <yibairen1...@gmail.com> wrote:
>>> It appears that autoincrement=True is set by default for primary key when
>>> upgrading from 1.0 to 1.1, no matter if it is integer (which is not in
>>> glance; they use VARCHAR(36)).
>>> 
>>> See https://bugs.launchpad.net/glance/+bug/1723097
>> 
>> It defaults to True in 1.0, the change in 1.1 is that it defaults to "auto":
>> 
>> http://docs.sqlalchemy.org/en/rel_1_1/changelog/migration_11.html#no-more-generation-of-an-implicit-key-for-composite-primary-key-w-auto-increment
>> 
>> if that migrate operation is altering a column from Integer to String,
>> then it's likely this is confusing things.   So this is a
>> sqlalchemy-migrate bug.
>> 
>> 
>> 
>> 
>> 
>>> 
>>> --
>>> SQLAlchemy -
>>> The Python SQL Toolkit and Object Relational Mapper
>>> 
>>> http://www.sqlalchemy.org/
>>> 
>>> To post example code, please provide an MCVE: Minimal, Complete, and
>>> Verifiable Example. See http://stackoverflow.com/help/mcve for a full
>>> description.
>>> ---
>>> You received this message because you are subscribed to the Google Groups
>>> "sqlalchemy" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an
>>> email to sqlalchemy+unsubscr...@googlegroups.com.
>>> To post to this group, send email to sqlalchemy@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/sqlalchemy.
>>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> SQLAlchemy - 
> The Python SQL Toolkit and Object Relational Mapper
> 
> http://www.sqlalchemy.org/
> 
> To post example code, please provide an MCVE: Minimal, Complete, and 
> Verifiable Example.  See  http://stackoverflow.com/help/mcve for a full 
> description.
> --- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "sqlalchemy" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/sqlalchemy/xoBcc6UnpWo/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> sqlalchemy+unsubscr...@googlegroups.com.
> To post to this group, send email to sqlalchemy@googlegroups.com.
> Visit this group at https://groups.google.com/group/sqlalchemy.
> For more options, visit https://groups.google.com/d/optout.

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.


[sqlalchemy] OpenStack Glance upgrade script breaks with SQLAlchemy 1.1.11 but not 1.0.12

2017-10-12 Thread Byron Yi
It appears that autoincrement=True is set by default for primary key when 
upgrading from 1.0 to 1.1, no matter if it is integer (which is not in 
glance; they use VARCHAR(36)).

See https://bugs.launchpad.net/glance/+bug/1723097

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.