Skip to content

Commit

Permalink
Fixes: sqlalchemy#1302 Added match keyword to rendering of ForeignK…
Browse files Browse the repository at this point in the history
…eyConstraint
  • Loading branch information
asibkamalsada committed Aug 25, 2023
1 parent 8620072 commit bd7ae16
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions alembic/autogenerate/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ def _add_fk_constraint(
"initially",
"deferrable",
"use_alter",
"match",
]
if not autogen_context._has_batch:
kwargs.insert(0, "source_schema")
Expand Down Expand Up @@ -977,6 +978,8 @@ def _populate_render_fk_opts(
opts.append(("deferrable", repr(constraint.deferrable)))
if constraint.use_alter:
opts.append(("use_alter", repr(constraint.use_alter)))
if constraint.match:
opts.append(("match", repr(constraint.match)))


@_constraint_renderers.dispatch_for(sa_schema.ForeignKeyConstraint)
Expand Down

0 comments on commit bd7ae16

Please sign in to comment.