Skip to content

[Fixes #1671] Passthrough dialect_kwargs to ops.create_foreign_key() #1672

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

jrmalin
Copy link

@jrmalin jrmalin commented Jun 6, 2025

Description

Fixes #1671

SqlAlchemy supports adding dialect kwargs for foreign keys, as does op.create_foreign_key(), but the renderer for ops.CreateForeignKeyOp does not pass through dialect_kwargs. An example of this is postgresql_not_valid.

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!

Copy link
Member

@zzzeek zzzeek left a comment

Choose a reason for hiding this comment

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

needs render tests

@jrmalin jrmalin requested review from zzzeek and CaselIT June 9, 2025 20:06
@jrmalin
Copy link
Author

jrmalin commented Jun 9, 2025

@CaselIT @zzzeek Assuming the changes are sufficient, what is best practice for requesting a release?

@CaselIT CaselIT requested a review from sqla-tester June 9, 2025 21:06
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 f2eec75 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 f2eec75: https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/5985

@jrmalin jrmalin requested a review from sqla-tester June 10, 2025 17:42
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.

Hi, this is sqla-tester and I see you've pinged me for review. However, user jrmalin is not authorized to initiate CI jobs. Please wait for a project member to do this!

@jrmalin
Copy link
Author

jrmalin commented Jun 10, 2025

@CaselIT @zzzeek I have fixed the flake8 issues, but I don't have permission to initiate sqla-tester to run CI.

@CaselIT CaselIT requested a review from sqla-tester June 10, 2025 20:25
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 c702f25 of this pull request into gerrit so we can run tests and reviews and stuff

@sqla-tester
Copy link
Collaborator

Patchset c702f25 added to existing Gerrit review https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/5985

@CaselIT CaselIT requested a review from sqla-tester June 10, 2025 20:32
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 bfcd8e4 of this pull request into gerrit so we can run tests and reviews and stuff

@sqla-tester
Copy link
Collaborator

Patchset bfcd8e4 added to existing Gerrit review https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/5985

@jrmalin
Copy link
Author

jrmalin commented Jun 10, 2025

@CaselIT it's unclear to me why these mssql tests might be failing, can you point me in the right direction here?

https://jenkins.sqlalchemy.org/job/alembic_gerrit/pyv=py313,sqla=sqlamain/1452/#showFailuresLink

@CaselIT
Copy link
Member

CaselIT commented Jun 10, 2025

that seems unrelated.

@zzzeek did https://gerrit.sqlalchemy.org/c/sqlalchemy/sqlalchemy/+/5964 break alembic?

@jrmalin
Copy link
Author

jrmalin commented Jun 12, 2025

@CaselIT @zzzeek Anything that can be done to push this over the line? Are all changes blocked by the sqlalchemy changes?

@zzzeek
Copy link
Member

zzzeek commented Jun 12, 2025

the fail here was fixed in main so if you rebase we can run again

@zzzeek
Copy link
Member

zzzeek commented Jun 12, 2025

actually nm the fix was in sqlalhcemy so i can just re-run

@sqla-tester
Copy link
Collaborator

Michael Bayer (zzzeek) wrote:

recheck

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

@zzzeek
Copy link
Member

zzzeek commented Jun 12, 2025

can you add a changelog file ? you can follow the format as seen in https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/5873/12/docs/build/unreleased/1330.rst . the message here would be a lot shorter since this is a much simpler change. your "tags" would be "usecase, operations"

@jrmalin
Copy link
Author

jrmalin commented Jun 12, 2025

can you add a changelog file ? you can follow the format as seen in https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/5873/12/docs/build/unreleased/1330.rst . the message here would be a lot shorter since this is a much simpler change. your "tags" would be "usecase, operations"

@zzzeek added, thank you for the example to pattern match!

@CaselIT CaselIT requested a review from sqla-tester June 12, 2025 19:56
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 246a363 of this pull request into gerrit so we can run tests and reviews and stuff

@sqla-tester
Copy link
Collaborator

Patchset 246a363 added to existing Gerrit review https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/5985

@jrmalin
Copy link
Author

jrmalin commented Jun 12, 2025

@CaselIT @zzzeek looks like the final pending check is now code review. Once approved, will one of you handle merging?

@CaselIT
Copy link
Member

CaselIT commented Jun 12, 2025

yes, we will take if from here, thanks!

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.

dialect_kwargs are not supported for foreign key creation
4 participants