aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTableStructure.m
diff options
context:
space:
mode:
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])