aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableSource.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/TableSource.m')
-rw-r--r--Source/TableSource.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/TableSource.m b/Source/TableSource.m
index 51ef01cc..b9b1a3c1 100644
--- a/Source/TableSource.m
+++ b/Source/TableSource.m
@@ -580,7 +580,7 @@ returns YES if no row is beeing edited and nothing has to be written to db
}
} else {
//CHANGE syntax
- if ( [[theRow objectForKey:@"Length"] isEqualToString:@""] || ![theRow objectForKey:@"Length"] ) {
+ if (([[theRow objectForKey:@"Length"] isEqualToString:@""]) || (![theRow objectForKey:@"Length"]) || ([[theRow objectForKey:@"Type"] isEqualToString:@"datetime"])) {
queryString = [NSMutableString stringWithFormat:@"ALTER TABLE `%@` CHANGE `%@` `%@` %@",
selectedTable, [oldRow objectForKey:@"Field"], [theRow objectForKey:@"Field"],
[theRow objectForKey:@"Type"]];