aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTableStructure.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2010-12-08 19:03:47 +0000
committerstuconnolly <stuart02@gmail.com>2010-12-08 19:03:47 +0000
commit61e398816badc49b301a6ae70c3697d581258cfb (patch)
treecca1e18f88c42556b4a5e48c1e685cb2b6574b78 /Source/SPTableStructure.m
parent3fccc9c751cded1360aa22796ed3c6d700fd04c1 (diff)
parent5b88ac6a6d0c02b1b51f295cf79e84b61c1f1bd5 (diff)
downloadsequelpro-61e398816badc49b301a6ae70c3697d581258cfb.tar.gz
sequelpro-61e398816badc49b301a6ae70c3697d581258cfb.tar.bz2
sequelpro-61e398816badc49b301a6ae70c3697d581258cfb.zip
Bring outline view branch up to date with trunk (r2976:2988).
Diffstat (limited to 'Source/SPTableStructure.m')
-rw-r--r--Source/SPTableStructure.m5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/SPTableStructure.m b/Source/SPTableStructure.m
index 79a0a0a2..f57a881f 100644
--- a/Source/SPTableStructure.m
+++ b/Source/SPTableStructure.m
@@ -1015,8 +1015,9 @@
else if ([[theRow objectForKey:@"default"] length] && [theRowType isEqualToString:@"BIT"]) {
[queryString appendFormat:@"\n DEFAULT %@", [theRow objectForKey:@"default"]];
}
- // Suppress appending DEFAULT clause for any numerics, date, time fields if default is empty to avoid error messages
- else if (![[theRow objectForKey:@"default"] length] && ([fieldValidation isFieldTypeNumeric:theRowType] || [fieldValidation isFieldTypeDate:theRowType])) {
+ // Suppress appending DEFAULT clause for any numerics, date, time fields if default is empty to avoid error messages;
+ // also don't specify a default for TEXT/BLOB or geometry fields to avoid strict mode errors
+ else if (![[theRow objectForKey:@"default"] length] && ([fieldValidation isFieldTypeNumeric:theRowType] || [fieldValidation isFieldTypeDate:theRowType] || [theRowType hasSuffix:@"TEXT"] || [theRowType hasSuffix:@"BLOB"] || [fieldValidation isFieldTypeGeometry:theRowType])) {
;
}
// Otherwise, use the provided default