diff options
author | rowanbeentje <rowan@beent.je> | 2011-01-11 00:54:04 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2011-01-11 00:54:04 +0000 |
commit | 1da136ca968282821f61695eae4746f6c802c046 (patch) | |
tree | 8d3193170dde151d96ebc3e0fd0bfeccd3e080ca | |
parent | 7b9d0404e46078c3b9e215bb7db2a8d272fc551e (diff) | |
download | sequelpro-1da136ca968282821f61695eae4746f6c802c046.tar.gz sequelpro-1da136ca968282821f61695eae4746f6c802c046.tar.bz2 sequelpro-1da136ca968282821f61695eae4746f6c802c046.zip |
- When resetting AUTO_INCREMENT for a table, always use the selected table name sourced from SPTablesList rather than a SPTableStructure cached value, which may not have been updated. This addresses Issue #945.
-rw-r--r-- | Source/SPTableStructure.m | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/Source/SPTableStructure.m b/Source/SPTableStructure.m index 8e6b7e77..1cd5ca4e 100644 --- a/Source/SPTableStructure.m +++ b/Source/SPTableStructure.m @@ -758,13 +758,7 @@ */ - (void)setAutoIncrementTo:(NSString*)valueAsString { - NSString *selTable = nil; - - // if selectedTable is nil try to get the name from SPTablesList - if (selectedTable == nil || ![selectedTable length]) - selTable = [tablesListInstance tableName]; - else - selTable = [NSString stringWithString:selectedTable]; + NSString *selTable = [tablesListInstance tableName]; if (selTable == nil || ![selTable length]) return; |