diff options
author | Max <post@wickenrode.com> | 2014-03-19 19:51:00 +0100 |
---|---|---|
committer | Max <post@wickenrode.com> | 2014-03-19 19:51:00 +0100 |
commit | f9837de31479152d8c29f06222bac3f5541b60b3 (patch) | |
tree | e84021b72921740b3b7799e7d0f7d9e8bb1ebc00 /Source/SPSQLExporter.m | |
parent | 2645c9480332d8dde088e09a57504cdd26a541b1 (diff) | |
download | sequelpro-f9837de31479152d8c29f06222bac3f5541b60b3.tar.gz sequelpro-f9837de31479152d8c29f06222bac3f5541b60b3.tar.bz2 sequelpro-f9837de31479152d8c29f06222bac3f5541b60b3.zip |
Add basic support for CURRENT_TIMESTAMP in DATETIME columns (MySQL 5.6.5)
See #1867
Diffstat (limited to 'Source/SPSQLExporter.m')
-rw-r--r-- | Source/SPSQLExporter.m | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/SPSQLExporter.m b/Source/SPSQLExporter.m index 03958f32..649e4ac3 100644 --- a/Source/SPSQLExporter.m +++ b/Source/SPSQLExporter.m @@ -884,7 +884,7 @@ [fieldString appendString:@" DEFAULT NULL"]; } } - else if ([[column objectForKey:@"type"] isEqualToString:@"TIMESTAMP"] && [column objectForKey:@"default"] != [NSNull null] && [[[column objectForKey:@"default"] uppercaseString] isEqualToString:@"CURRENT_TIMESTAMP"]) { + else if (([[column objectForKey:@"type"] isEqualToString:@"TIMESTAMP"] || [[column objectForKey:@"type"] isEqualToString:@"DATETIME"]) && [column objectForKey:@"default"] != [NSNull null] && [[[column objectForKey:@"default"] uppercaseString] isEqualToString:@"CURRENT_TIMESTAMP"]) { [fieldString appendString:@" DEFAULT CURRENT_TIMESTAMP"]; } else { |