Ticket #4800: db-default.diff
File db-default.diff, 984 bytes (added by , 17 years ago) |
---|
-
django/core/management.py
186 186 field_output.append(style.SQL_KEYWORD('UNIQUE')) 187 187 if f.primary_key: 188 188 field_output.append(style.SQL_KEYWORD('PRIMARY KEY')) 189 if f.has_default(): 190 if f.get_default() in [False, True]: 191 default = str(int(f.get_default())) 192 else: 193 default = backend.quote_name(f.get_default()) 194 field_output.append(style.SQL_KEYWORD('DEFAULT') + ' ' + default) 189 195 if tablespace and backend.supports_tablespaces and (f.unique or f.primary_key) and backend.autoindexes_primary_keys: 190 196 # We must specify the index tablespace inline, because we 191 197 # won't be generating a CREATE INDEX statement for this field.