diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPTableData.m | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/SPTableData.m b/Source/SPTableData.m index ae5f1b2f..7561b1ce 100644 --- a/Source/SPTableData.m +++ b/Source/SPTableData.m @@ -308,7 +308,12 @@ // Split the remaining field definition string by spaces and process [tableColumn addEntriesFromDictionary:[self parseFieldDefinitionStringParts:[fieldsParser splitStringByCharacter:' ' skippingBrackets:YES]]]; - + + //if column is not null, but doesn't have a default value, set empty string + if([[tableColumn objectForKey:@"null"] intValue] == 0 && [[tableColumn objectForKey:@"autoincrement"] intValue] == 0 && ![tableColumn objectForKey:@"default"]) { + [tableColumn setObject:@"" forKey:@"default"]; + } + // Store the column. [tableColumns addObject:[NSDictionary dictionaryWithDictionary:tableColumn]]; |