New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autogen primary key renderer uses `column.key` instead of `column.name` when assembling list of columns #335

Closed
sqlalchemy-bot opened this Issue Oct 25, 2015 · 6 comments

Comments

Projects
None yet
1 participant
@sqlalchemy-bot

sqlalchemy-bot commented Oct 25, 2015

Migrated issue, originally created by Jesse Dhillon (@jessedhillon)

Possibly related to #259

When rendering PrimaryKeyConstraint, I've noticed that I have to manually fix the output because the list of columns references each column's key property instead of name. Reading the SQLAlchemy docs, particularly:

The name of this column as represented in the database.

~ sqlalchemy.schema.Column.params.name

and

the name field is used only when rendering SQL.

~ sqlalchemy.schema.Column.params.key

it seems that name is the correct choice when building a PrimaryKeyConstraint.

@sqlalchemy-bot

This comment has been minimized.

@sqlalchemy-bot

This comment has been minimized.

sqlalchemy-bot commented Oct 25, 2015

Michael Bayer (@zzzeek) wrote:

all of these things are true! thanks for the PR, on my list.

@sqlalchemy-bot

This comment has been minimized.

sqlalchemy-bot commented Oct 25, 2015

Changes by Michael Bayer (@zzzeek):

  • set milestone to "fasttrack"
@sqlalchemy-bot

This comment has been minimized.

sqlalchemy-bot commented Jan 29, 2016

Michael Bayer (@zzzeek) wrote:

  • PrimaryKeyConstraint should be rendered referencing the name
    property of the columns it comprises, instead of the key. See #335

5b630c1

@sqlalchemy-bot

This comment has been minimized.

sqlalchemy-bot commented Jan 29, 2016

Michael Bayer (@zzzeek) wrote:

  • changelog for pr49, fixes #335

dd882e3

@sqlalchemy-bot

This comment has been minimized.

sqlalchemy-bot commented Jan 29, 2016

Changes by Michael Bayer (@zzzeek):

  • changed status to closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment