Index: trunk/extensions/Wikidata/Database scripts/Convenience/Create transactions indices.sql |
— | — | @@ -1,2 +0,0 @@ |
2 | | -ALTER TABLE `transactions` |
3 | | - ADD INDEX `user` (`user_id`, `transaction_id`); |
Index: trunk/extensions/Wikidata/Database scripts/Convenience/Create uw_transactions indices.sql |
— | — | @@ -1,2 +0,0 @@ |
2 | | -ALTER TABLE `%dc%_transactions` |
3 | | - ADD INDEX `user` (`user_id`, `transaction_id`); |
Index: trunk/extensions/Wikidata/Database scripts/Convenience/Recreate indexes for all tables for website.php |
— | — | @@ -95,7 +95,6 @@ |
96 | 96 | $dc = "uw"; |
97 | 97 | |
98 | 98 | $tables = array( |
99 | | - "transactions", |
100 | 99 | "translated_content", |
101 | 100 | "alt_meaningtexts", |
102 | 101 | "class_attributes", |
— | — | @@ -119,6 +118,7 @@ |
120 | 119 | $dataSet = new WikiDataSet($prefix); |
121 | 120 | recreateIndexesForTableNew($dataSet->bootstrappedDefinedMeanings, $purpose); |
122 | 121 | recreateIndexesForTableNew($dataSet->expression, $purpose); |
| 122 | + recreateIndexesForTableNew($dataSet->transactions, $purpose); |
123 | 123 | |
124 | 124 | recreateIndexesForTables($prefix, $tables); |
125 | 125 | } |
Index: trunk/extensions/Wikidata/OmegaWiki/WikiDataTables.php |
— | — | @@ -221,7 +221,11 @@ |
222 | 222 | $this->timestamp = $this->createColumn("timestamp"); |
223 | 223 | $this->comment = $this->createColumn("comment"); |
224 | 224 | |
225 | | - $this->setKeyColumns(array($this->transactionId)); |
| 225 | + $this->setKeyColumns(array($this->transactionId)); |
| 226 | + |
| 227 | + $this->setWebSiteIndexes(array( |
| 228 | + new TableIndex("user", array($this->userId, $this->transactionId)) |
| 229 | + )); |
226 | 230 | } |
227 | 231 | } |
228 | 232 | |
— | — | @@ -513,7 +517,7 @@ |
514 | 518 | $this->meaningRelations = new MeaningRelationsTable("{$dataSetPrefix}_meaning_relations"); |
515 | 519 | $this->syntrans = new SyntransTable("{$dataSetPrefix}_syntrans"); |
516 | 520 | $this->textAttributeValues = new TextAttributeValuesTable("{$dataSetPrefix}_text_attribute_values"); |
517 | | - $this->transactions = new Table("{$dataSetPrefix}_transactions", false, array("transaction_id")); |
| 521 | + $this->transactions = new TransactionsTable("{$dataSetPrefix}_transactions", false, array("transaction_id")); |
518 | 522 | $this->translatedContentAttributeValues = new TranslatedContentAttributeValuesTable("{$dataSetPrefix}_translated_content_attribute_values"); |
519 | 523 | $this->translatedContent = new TranslatedContentTable("{$dataSetPrefix}_translated_content"); |
520 | 524 | $this->optionAttributeOptions = new OptionAttributeOptionsTable("{$dataSetPrefix}_option_attribute_options"); |