aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTableStructure.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2011-01-04 02:31:18 +0000
committerrowanbeentje <rowan@beent.je>2011-01-04 02:31:18 +0000
commit12c773ff7f06a240e66a264b23261f0436e56175 (patch)
tree54f39a28c656800c0c213fd371958ed4638f5dfb /Source/SPTableStructure.m
parente85f7dfdc240b9e5be2ff4cbe46727f49096f91f (diff)
downloadsequelpro-12c773ff7f06a240e66a264b23261f0436e56175.tar.gz
sequelpro-12c773ff7f06a240e66a264b23261f0436e56175.tar.bz2
sequelpro-12c773ff7f06a240e66a264b23261f0436e56175.zip
- Rework the Add Index indexes menu and the auto_increment index required menu to use tag-based values when generating queries, allowing localisation of menu contents without using those localised values in queries. This addresses I$
- Remove the ability to specify a FULLTEXT auto_increment index, as I believe this isn't possible. - Prevent sheet reuse from specifying invalid storage types for PRIMARY KEYs - Fix exceptions when adding indexes to a table where every field is already indexed - Fix initialField/indexedFieldNames check to improve on r3061 - Fix toggling advanced index view after closing the sheet with the view open - Update localisable strings
Diffstat (limited to 'Source/SPTableStructure.m')
-rw-r--r--Source/SPTableStructure.m14
1 files changed, 12 insertions, 2 deletions
diff --git a/Source/SPTableStructure.m b/Source/SPTableStructure.m
index f57a881f..8e6b7e77 100644
--- a/Source/SPTableStructure.m
+++ b/Source/SPTableStructure.m
@@ -1219,8 +1219,18 @@
alertSheetOpened = NO;
if(contextInfo && [contextInfo isEqualToString:@"autoincrementindex"]) {
- if(returnCode) {
- autoIncrementIndex = [chooseKeyButton titleOfSelectedItem];
+ if (returnCode) {
+ switch ([[chooseKeyButton selectedItem] tag]) {
+ case SPPrimaryKeyMenuTag:
+ autoIncrementIndex = @"PRIMARY KEY";
+ break;
+ case SPIndexMenuTag:
+ autoIncrementIndex = @"INDEX";
+ break;
+ case SPUniqueMenuTag:
+ autoIncrementIndex = @"UNIQUE";
+ break;
+ }
} else {
autoIncrementIndex = nil;
if([tableSourceView selectedRow] > -1 && [extraFieldSuggestions count])