Skip to content

Commit

Permalink
Fixes: sqlalchemy#721, added detectection to the Table.prefixes param…
Browse files Browse the repository at this point in the history
…eter and add it to the 'create table' render if it exists
  • Loading branch information
rmoretto committed Sep 5, 2020
1 parent 134ee6e commit 82a37c5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions alembic/autogenerate/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,11 @@ def _add_table(autogen_context, op):
text += ",\ncomment=%r" % _ident(comment)
for k in sorted(op.kw):
text += ",\n%s=%r" % (k.replace(" ", "_"), op.kw[k])

if table._prefixes:
prefixes = ", ".join("'%s'" % p for p in table._prefixes)
text += ",\nprefixes=[%s]" % prefixes

text += "\n)"
return text

Expand Down

0 comments on commit 82a37c5

Please sign in to comment.