From: Alexander Kolov Date: Tue, 24 Apr 2012 00:19:03 +0000 (+0200) Subject: Fix parsing foreign key constraints with multiple dots. X-Git-Tag: rel_0_3_2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc6a6314a343b4b7ee79407ca072daff3960604c;p=thirdparty%2Fsqlalchemy%2Falembic.git Fix parsing foreign key constraints with multiple dots. --- 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: