aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/SPIndexesController.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/SPIndexesController.m b/Source/SPIndexesController.m
index c0bf2448..2bfa527b 100644
--- a/Source/SPIndexesController.m
+++ b/Source/SPIndexesController.m
@@ -678,8 +678,8 @@ NSString *SPNewIndexKeyBlockSize = @"IndexKeyBlockSize";
[tempIndexedColumns addObject:[columnName backtickQuotedString]];
}
}
-
- if (![indexType isEqualToString:@"INDEX"]) indexType = [indexType stringByAppendingFormat:@" INDEX"];
+
+ if ((![indexType isEqualToString:@"INDEX"]) && (![indexType isEqualToString:@"PRIMARY KEY"])) indexType = [indexType stringByAppendingFormat:@" INDEX"];
// Build the query
NSMutableString *query = [NSMutableString stringWithFormat:@"ALTER TABLE %@ ADD %@", [table backtickQuotedString], indexType];