Skip to content
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

Add "create_primary_key_constraint" #93

Closed
sqlalchemy-bot opened this issue Dec 4, 2012 · 6 comments
Closed

Add "create_primary_key_constraint" #93

sqlalchemy-bot opened this issue Dec 4, 2012 · 6 comments

Comments

@sqlalchemy-bot
Copy link

@sqlalchemy-bot sqlalchemy-bot commented Dec 4, 2012

Migrated issue, originally created by Domen Kožar (@iElectric)

Would be nice to have create_primary_key_constraint method on operations class.

@sqlalchemy-bot
Copy link
Author

@sqlalchemy-bot sqlalchemy-bot commented Dec 5, 2012

Michael Bayer (@zzzeek) wrote:

yup

@sqlalchemy-bot
Copy link
Author

@sqlalchemy-bot sqlalchemy-bot commented Dec 12, 2012

Anonymous wrote:

Agreed. Is there actually a way to create primary key constraints with the actual operation methods? I mean, without recreating the column(s)?

@sqlalchemy-bot
Copy link
Author

@sqlalchemy-bot sqlalchemy-bot commented Dec 12, 2012

Michael Bayer (@zzzeek) wrote:

you'd combine schema.AddConstraint() with the schema.PrimaryKeyConstraint() constructs, then pass that to op.execute(). The only inconvenience is that you need to give PKConstraint actual Column objects, and it might complain if there isn't also a Table present.

@sqlalchemy-bot
Copy link
Author

@sqlalchemy-bot sqlalchemy-bot commented Feb 11, 2013

Michael Bayer (@zzzeek) wrote:

Issue #105 was marked as a duplicate of this issue.

@sqlalchemy-bot
Copy link
Author

@sqlalchemy-bot sqlalchemy-bot commented Apr 4, 2013

Michael Bayer (@zzzeek) wrote:

a41e467

@sqlalchemy-bot
Copy link
Author

@sqlalchemy-bot sqlalchemy-bot commented Apr 4, 2013

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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.