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

FK options missing from _add_fk_constraint #298

sqlalchemy-bot opened this Issue May 19, 2015 · 2 comments


None yet
1 participant

sqlalchemy-bot commented May 19, 2015

Migrated issue, originally created by Michael Bayer (@zzzeek)

render fk constraint has:

        opts.append(("name", repr(
    if constraint.onupdate:
        opts.append(("onupdate", repr(constraint.onupdate)))
    if constraint.ondelete:
        opts.append(("ondelete", repr(constraint.ondelete)))
    if constraint.initially:
        opts.append(("initially", repr(constraint.initially)))
    if constraint.deferrable:
        opts.append(("deferrable", repr(constraint.deferrable)))
    if constraint.use_alter:
        opts.append(("use_alter", repr(constraint.use_alter)))

whereas add_fk_constraint only has:

    if constraint.deferrable:
        args.append("%s=%r" % ("deferrable", str(constraint.deferrable)))
    if constraint.initially:
        args.append("%s=%r" % ("initially", str(constraint.initially)))


This comment has been minimized.

sqlalchemy-bot commented May 19, 2015

Michael Bayer (@zzzeek) wrote:

  • Fixed bug where foreign key options including "onupdate",
    "ondelete" would not render within the op.create_foreign_key()
    directive, even though they render within a full
    ForeignKeyConstraint directive.
    fixes #298



This comment has been minimized.

sqlalchemy-bot commented May 19, 2015

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