OpenStack Glance upgrade script breaks with SQLAlchemy 1.1.11 but not 1.0.12

12 views
Skip to first unread message

Byron Yi

unread,
Oct 12, 2017, 8:32:01 AM10/12/17
to sqlalchemy
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)).

Mike Bayer

unread,
Oct 12, 2017, 9:51:50 AM10/12/17
to sqlal...@googlegroups.com
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+...@googlegroups.com.
> To post to this group, send email to sqlal...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sqlalchemy.
> For more options, visit https://groups.google.com/d/optout.

Mike Bayer

unread,
Oct 12, 2017, 9:54:58 AM10/12/17
to sqlal...@googlegroups.com

Byron Yi

unread,
Oct 12, 2017, 9:57:46 AM10/12/17
to sqlal...@googlegroups.com
Thanks Mike. Glad to know it’s been fixed.

Best,
Bairen
> 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+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages