Ticket #711: south.diff

File south.diff, 961 bytes (added by andrew, 3 years ago)
Line 
1diff -r af3e2834936c south/db/oracle.py
2--- a/south/db/oracle.py        Thu Jan 13 13:18:33 2011 +0000
3+++ b/south/db/oracle.py        Mon Jan 17 14:32:40 2011 -0800
4@@ -37,8 +37,8 @@
5     def adj_column_sql(self, col):
6         col = re.sub('(?P<constr>CHECK \(.*\))(?P<any>.*)(?P<default>DEFAULT [0|1])',
7                      lambda mo: '%s %s%s'%(mo.group('default'), mo.group('constr'), mo.group('any')), col) #syntax fix for boole
8an field only
9-        col = re.sub('(?P<not_null>NOT NULL) (?P<default>DEFAULT.+)',^M
10-                     lambda mo: '%s %s'%(mo.group('default'), mo.group('not_null')), col) #fix order  of DEFAULT and NOT NULL^M
11+        col = re.sub('(?P<not_null>(NOT )?NULL) (?P<misc>(.* )?)(?P<default>DEFAULT.+)',^M
12+                     lambda mo: '%s %s %s'%(mo.group('default'),mo.group('not_null'),mo.group('misc') or ''), col) #fix order  o
13f DEFAULT and NOT NULL^M
14         return col
15 
16     def check_m2m(self, table_name):