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/SPTableStructureLoading.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/SPTableStructureLoading.m')
-rw-r--r-- | Source/SPTableStructureLoading.m | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/SPTableStructureLoading.m b/Source/SPTableStructureLoading.m index 399176c2..07656155 100644 --- a/Source/SPTableStructureLoading.m +++ b/Source/SPTableStructureLoading.m @@ -247,8 +247,9 @@ [theField setObject:@"auto_increment" forKey:@"Extra"]; } - // For timestamps check to see whether "on update CURRENT_TIMESTAMP" and set Extra accordingly - else if ([type isEqualToString:@"TIMESTAMP"] && [[theField objectForKey:@"onupdatetimestamp"] integerValue]) { + // For timestamps/datetime check to see whether "on update CURRENT_TIMESTAMP" and set Extra accordingly + else if (([type isEqualToString:@"TIMESTAMP"] || [type isEqualToString:@"DATETIME"]) && + [[theField objectForKey:@"onupdatetimestamp"] integerValue]) { [theField setObject:@"on update CURRENT_TIMESTAMP" forKey:@"Extra"]; } } |