From dc6a6314a343b4b7ee79407ca072daff3960604c Mon Sep 17 00:00:00 2001 From: Alexander Kolov Date: Tue, 24 Apr 2012 02:19:03 +0200 Subject: [PATCH] Fix parsing foreign key constraints with multiple dots. --- alembic/operations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/alembic/operations.py b/alembic/operations.py index f3150395..ece62486 100644 --- a/alembic/operations.py +++ b/alembic/operations.py @@ -109,9 +109,9 @@ class Operations(object): """ 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: -- 2.47.2