aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTableStructureLoading.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPTableStructureLoading.m')
-rw-r--r--Source/SPTableStructureLoading.m5
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"];
}
}