diff options
author | rowanbeentje <rowan@beent.je> | 2013-04-14 23:45:45 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2013-04-14 23:45:45 +0000 |
commit | cc2ac82afa576436bbc8b4d8a85a87586e56443e (patch) | |
tree | 476490df9fcc8b7fb6ce9bf37ad864ca326f6ac6 /Source/SPSQLExporter.m | |
parent | 20b3e061bf426ed87f3f3653572cf729d45543e3 (diff) | |
download | sequelpro-cc2ac82afa576436bbc8b4d8a85a87586e56443e.tar.gz sequelpro-cc2ac82afa576436bbc8b4d8a85a87586e56443e.tar.bz2 sequelpro-cc2ac82afa576436bbc8b4d8a85a87586e56443e.zip |
- Specify the NULL status of fields when creating view placeholders on export, fixing problems with invalid timestamp NULL defaults, addressing Issue #1686
Diffstat (limited to 'Source/SPSQLExporter.m')
-rw-r--r-- | Source/SPSQLExporter.m | 6 |
1 files changed, 5 insertions, 1 deletions
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"]) { |