Commits

Alexander Kolov committed 29e2b54

Fix parsing foreign key constraints with multiple dots.

Comments (0)

Files changed (1)

alembic/operations.py

 
         """
         if isinstance(fk._colspec, basestring):
-            table_key, cname = fk._colspec.split('.')
+            table_key, cname = fk._colspec.rsplit('.', 1)
             if '.' in table_key:
-                tokens = tname.split('.')
+                tokens = table_key.split('.')
                 sname = ".".join(tokens[0:-1])
                 tname = tokens[-1]
             else: