From cc2ac82afa576436bbc8b4d8a85a87586e56443e Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Sun, 14 Apr 2013 23:45:45 +0000 Subject: - Specify the NULL status of fields when creating view placeholders on export, fixing problems with invalid timestamp NULL defaults, addressing Issue #1686 --- Source/SPSQLExporter.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/SPSQLExporter.m b/Source/SPSQLExporter.m index 10f039f6..fa1df5d0 100644 --- a/Source/SPSQLExporter.m +++ b/Source/SPSQLExporter.m @@ -884,7 +884,11 @@ if ([[column objectForKey:@"unsigned"] integerValue] == 1) [fieldString appendString:@" UNSIGNED"]; if ([[column objectForKey:@"zerofill"] integerValue] == 1) [fieldString appendString:@" ZEROFILL"]; if ([[column objectForKey:@"binary"] integerValue] == 1) [fieldString appendString:@" BINARY"]; - if ([[column objectForKey:@"null"] integerValue] == 0) [fieldString appendString:@" NOT NULL"]; + if ([[column objectForKey:@"null"] integerValue] == 0) { + [fieldString appendString:@" NOT NULL"]; + } else { + [fieldString appendString:@" NULL"]; + } // Provide the field default if appropriate if ([column objectForKey:@"default"]) { -- cgit v1.2.3