File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -33,10 +33,6 @@ def column_type(self, column):
33
33
def column_type_info (self , column ):
34
34
"""
35
35
"""
36
- if column .get ('auto_increment' , None ):
37
- return 'integer DEFAULT nextval(\' %s_%s_seq\' ::regclass) NOT NULL' % (
38
- column ['table_name' ], column ['name' ])
39
-
40
36
null = "" if column ['null' ] else " NOT NULL"
41
37
42
38
def get_type (column ):
@@ -128,6 +124,11 @@ def get_type(column):
128
124
raise Exception ('unknown %s' % column ['type' ])
129
125
130
126
default , column_type = get_type (column )
127
+
128
+ if column .get ('auto_increment' , None ):
129
+ return '%s DEFAULT nextval(\' %s_%s_seq\' ::regclass) NOT NULL' % (
130
+ column_type , column ['table_name' ], column ['name' ])
131
+
131
132
return '%s%s%s' % (column_type , (default if not default == None else '' ), null )
132
133
133
134
def process_row (self , table , row ):
You can’t perform that action at this time.
0 commit comments