aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2016-03-20 19:06:27 +0100
committerMax <post@wickenrode.com>2016-03-20 19:06:27 +0100
commit8b751d9027afe08aa3f049d28e172a169641a284 (patch)
tree42b625a56708747da9a934035961d2b59359821f
parenta3270c3c4c6594e878ea3ed4fa28934589130b84 (diff)
downloadsequelpro-8b751d9027afe08aa3f049d28e172a169641a284.tar.gz
sequelpro-8b751d9027afe08aa3f049d28e172a169641a284.tar.bz2
sequelpro-8b751d9027afe08aa3f049d28e172a169641a284.zip
Fix a minor issue where switching an existing datatype to JSON could cause an invalid field combination for some datatypes
-rw-r--r--Source/SPTableStructureDelegate.m5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/SPTableStructureDelegate.m b/Source/SPTableStructureDelegate.m
index 755cc2b8..42a9eaa3 100644
--- a/Source/SPTableStructureDelegate.m
+++ b/Source/SPTableStructureDelegate.m
@@ -201,7 +201,7 @@ static void _BuildMenuWithPills(NSMenu *menu,struct _cmpMap *map,size_t mapEntri
[currentRow setObject:newCollation forKey:@"collationName"];
return;
}
- // Reset collation if BINARY was set changed, as enabling BINARY sets collation to *_bin
+ // Reset collation if BINARY was changed, as enabling BINARY sets collation to *_bin
else if ([[aTableColumn identifier] isEqualToString:@"binary"]) {
if ([[currentRow objectForKey:@"binary"] integerValue] != [anObject integerValue]) {
[currentRow removeObjectForKey:@"collationName"];
@@ -264,7 +264,8 @@ static void _BuildMenuWithPills(NSMenu *menu,struct _cmpMap *map,size_t mapEntri
// If type is BLOB or TEXT reset DEFAULT since these field types don't allow a default
if ([[currentRow objectForKey:@"type"] hasSuffix:@"TEXT"] ||
- [[currentRow objectForKey:@"type"] hasSuffix:@"BLOB"] ||
+ [[currentRow objectForKey:@"type"] hasSuffix:@"BLOB"] ||
+ [[currentRow objectForKey:@"type"] isEqualToString:@"JSON"] ||
[fieldValidation isFieldTypeGeometry:[currentRow objectForKey:@"type"]] ||
([fieldValidation isFieldTypeDate:[currentRow objectForKey:@"type"]] && ![[currentRow objectForKey:@"type"] isEqualToString:@"YEAR"]))
{