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

Fix constraint_name type of create_foreign_key #914

Closed
wants to merge 5 commits into from
Closed

Fix constraint_name type of create_foreign_key #914

wants to merge 5 commits into from

Conversation

TilmanK
Copy link
Contributor

@TilmanK TilmanK commented Sep 13, 2021

Make the type of contraint_name optional in create_foreign_key

Description

  • Make the type of contraint_name optional in create_foreign_key as stated in the documentation (passing None will auto-generate a constraint name).
  • Fixes some typos/inconsistencies in documentation.

Checklist

This pull request is:

  • A documentation / typographical error fix
    • Good to go, no issue or tests are needed
  • A short code fix
    • please include the issue number, and create an issue if none exists, which
      must include a complete example of the issue. one line code fixes without an
      issue and demonstration will not be accepted.
    • Please include: Fixes: #<issue number> in the commit message
    • please include tests. one line code fixes without tests will not be accepted.
  • A new feature implementation
    • please include the issue number, and create an issue if none exists, which must
      include a complete example of how the feature would look.
    • Please include: Fixes: #<issue number> in the commit message
    • please include tests.

Have a nice day!

@CaselIT
Copy link
Member

CaselIT commented Sep 13, 2021

Hi,

The pyi files are auto-generated as mentioned at the top of the file, so you should update the typing and documentation in the alembic/operations/ops.py then re-run the genetion script in tools/

@TilmanK
Copy link
Contributor Author

TilmanK commented Sep 13, 2021

Hey @CaselIT,

sorry, I haven't read that particular line and didn't notice that the source files are actually typed. Are you going to squash the three commits, or shall I rework them into one?

@CaselIT
Copy link
Member

CaselIT commented Sep 13, 2021

Are you going to squash the three commits, or shall I rework them into one?

they will be squashed by gerrit, so it's fine to have multiple commits.

I'll make the test run

Copy link
Collaborator

@sqla-tester sqla-tester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, this is sqla-tester setting up my work on behalf of CaselIT to try to get revision d985abb of this pull request into gerrit so we can run tests and reviews and stuff

@sqla-tester
Copy link
Collaborator

New Gerrit review created for change d985abb: https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/3075

@CaselIT
Copy link
Member

CaselIT commented Sep 13, 2021

Since we are changing this, also create_primary_key accepts None as name

@TilmanK
Copy link
Contributor Author

TilmanK commented Sep 13, 2021

What about create_index?

@CaselIT
Copy link
Member

CaselIT commented Sep 13, 2021

I guess all of the create_xx that mention that it can be None

Copy link
Collaborator

@sqla-tester sqla-tester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mike bayer (zzzeek) wrote:

i say fix that pk one , then merge

View this in Gerrit at https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/3075

  • alembic/op.pyi (line 621): yes

Copy link
Collaborator

@sqla-tester sqla-tester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, this is sqla-tester setting up my work on behalf of CaselIT to try to get revision 39d44af of this pull request into gerrit so we can run tests and reviews and stuff

@sqla-tester
Copy link
Collaborator

Patchset 39d44af added to existing Gerrit review https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/3075

@sqla-tester
Copy link
Collaborator

mike bayer (zzzeek) wrote:

i was merging this and missed it!! 1.7.3 is right now sorry

View this in Gerrit at https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/3075

@sqla-tester
Copy link
Collaborator

Gerrit review https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/3075 has been merged. Congratulations! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants