diff options
author | rowanbeentje <rowan@beent.je> | 2009-06-24 23:16:39 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2009-06-24 23:16:39 +0000 |
commit | 15981eb3fbf5438de932c7b815707f3c6a7f0110 (patch) | |
tree | ed94fde25abb851c1874cf7bda1742938d5adf54 /Source/TableSource.m | |
parent | e56731e44cf507c17f3e8f231f452fda0dad3bb5 (diff) | |
download | sequelpro-15981eb3fbf5438de932c7b815707f3c6a7f0110.tar.gz sequelpro-15981eb3fbf5438de932c7b815707f3c6a7f0110.tar.bz2 sequelpro-15981eb3fbf5438de932c7b815707f3c6a7f0110.zip |
- We have always allowed setting "on update CURRENT_TIMESTAMP" for timestamp columns - parse out this information, and now also show if it's set in the structure view. Fixes the setting not appearing to work.
Diffstat (limited to 'Source/TableSource.m')
-rw-r--r-- | Source/TableSource.m | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/TableSource.m b/Source/TableSource.m index 3ead57ac..bd48b2ce 100644 --- a/Source/TableSource.m +++ b/Source/TableSource.m @@ -149,6 +149,14 @@ loads aTable, put it in an array, update the tableViewColumns and reload the tab [possibleValues release]; [valueParser release]; } + + // For timestamps check to see whether "on update CURRENT_TIMESTAMP" - not returned + // by SHOW COLUMNS - should be set from the table data store + if ([type isEqualToString:@"timestamp"] + && [[[tableDataInstance columnWithName:[field objectForKey:@"Field"]] objectForKey:@"onupdatetimestamp"] intValue]) + { + [field setObject:@"on update CURRENT_TIMESTAMP" forKey:@"Extra"]; + } // scan extras for values like unsigned, zerofill, binary extrasArray = [extras componentsSeparatedByString:@" "]; |