aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTableStructure.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPTableStructure.m')
-rw-r--r--Source/SPTableStructure.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/SPTableStructure.m b/Source/SPTableStructure.m
index b2675271..807ff1ae 100644
--- a/Source/SPTableStructure.m
+++ b/Source/SPTableStructure.m
@@ -856,8 +856,8 @@ static NSString *SPRemoveFieldAndForeignKey = @"SPRemoveFieldAndForeignKey";
[queryString appendString:@"\n DEFAULT NULL"];
}
}
- // Otherwise, if CURRENT_TIMESTAMP was specified for timestamps, use that
- else if ([theRowType isEqualToString:@"TIMESTAMP"] &&
+ // Otherwise, if CURRENT_TIMESTAMP was specified for timestamps/datetimes, use that
+ else if (([theRowType isEqualToString:@"TIMESTAMP"] || [theRowType isEqualToString:@"DATETIME"]) &&
[[[theRow objectForKey:@"default"] uppercaseString] isEqualToString:@"CURRENT_TIMESTAMP"])
{
[queryString appendString:@"\n DEFAULT CURRENT_TIMESTAMP"];