From ab1ce622c27e4528907a9cb389234fbbe331548e Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Fri, 12 Aug 2011 19:31:30 +0000 Subject: Re-add default new table's id field to AUTO_INCREMENT added in r3331, but knocked out in r3376. --- Source/SPTablesList.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/SPTablesList.m') diff --git a/Source/SPTablesList.m b/Source/SPTablesList.m index f79a778b..9b92763a 100644 --- a/Source/SPTablesList.m +++ b/Source/SPTablesList.m @@ -2254,7 +2254,7 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; engineStatement = [NSString stringWithFormat:@"%@ = %@", [[tableDocumentInstance serverSupport] engineTypeQueryName], [tableType backtickQuotedString]]; } - NSString *createStatement = [NSString stringWithFormat:@"CREATE TABLE %@ (%@) %@ %@", [tableName backtickQuotedString], ([tableType isEqualToString:@"CSV"]) ? @"id INT NOT NULL" : @"id INT", charSetStatement, engineStatement]; + NSString *createStatement = [NSString stringWithFormat:@"CREATE TABLE %@ (id INT(11) UNSIGNED NOT NULL%@) %@ %@", [tableName backtickQuotedString], [tableType isEqualToString:@"CSV"] ? @"" : @" PRIMARY KEY AUTO_INCREMENT", charSetStatement, engineStatement]; // Create the table [mySQLConnection queryString:createStatement]; -- cgit v1.2.3