Ticket #952: constraint-comparison-fix

File constraint-comparison-fix, 789 bytes (added by Trey Hunner <treyhunner@…>, 2 years ago)
Line 
1diff -r dca268e628a4 south/db/generic.py
2--- a/south/db/generic.py       Sun Nov 13 18:16:42 2011 +0000
3+++ b/south/db/generic.py       Mon Nov 14 12:19:02 2011 -0800
4@@ -530,7 +530,7 @@
5             raise ValueError("Cannot get constraints for columns during a dry run.")
6 
7         if columns is not None:
8-            columns = set(columns)
9+            columns = set(map(lambda s: s.lower(), columns))
10 
11         db_name = self._get_setting('NAME')
12 
13@@ -539,7 +539,7 @@
14             for kind, cname in constraints:
15                 if kind == type:
16                     cnames.setdefault(cname, set())
17-                    cnames[cname].add(col)
18+                    cnames[cname].add(col.lower())
19 
20         for cname, cols in cnames.items():
21             if cols == columns or columns is None: