diff options
author | stuconnolly <stuart02@gmail.com> | 2011-08-12 19:31:30 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2011-08-12 19:31:30 +0000 |
commit | ab1ce622c27e4528907a9cb389234fbbe331548e (patch) | |
tree | 3a95d63bda2adc72fb76c91db05cb4c170a8bf81 /Source/SPTablesList.m | |
parent | 7ff956f14c8ba029c0b659d1560dc4178c4da79b (diff) | |
download | sequelpro-ab1ce622c27e4528907a9cb389234fbbe331548e.tar.gz sequelpro-ab1ce622c27e4528907a9cb389234fbbe331548e.tar.bz2 sequelpro-ab1ce622c27e4528907a9cb389234fbbe331548e.zip |
Re-add default new table's id field to AUTO_INCREMENT added in r3331, but knocked out in r3376.
Diffstat (limited to 'Source/SPTablesList.m')
-rw-r--r-- | Source/SPTablesList.m | 2 |
1 files changed, 1 insertions, 1 deletions
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]; |