summaryrefslogtreecommitdiff
path: root/alembic/autogenerate/render.py
diff options
context:
space:
mode:
Diffstat (limited to 'alembic/autogenerate/render.py')
-rw-r--r--alembic/autogenerate/render.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/alembic/autogenerate/render.py b/alembic/autogenerate/render.py
index 53c714d..b89227a 100644
--- a/alembic/autogenerate/render.py
+++ b/alembic/autogenerate/render.py
@@ -323,6 +323,9 @@ def _render_primary_key(constraint, autogen_context):
if rendered is not False:
return rendered
+ if not constraint.columns:
+ return None
+
opts = []
if constraint.name:
opts.append(("name", repr(constraint.name)))