aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2013-04-14 23:45:45 +0000
committerrowanbeentje <rowan@beent.je>2013-04-14 23:45:45 +0000
commitcc2ac82afa576436bbc8b4d8a85a87586e56443e (patch)
tree476490df9fcc8b7fb6ce9bf37ad864ca326f6ac6
parent20b3e061bf426ed87f3f3653572cf729d45543e3 (diff)
downloadsequelpro-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
-rw-r--r--Source/SPSQLExporter.m6
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"]) {