Index: trunk/extensions/Wikidata/Database scripts/Convenience/Create uw_collection_contents indices.sql |
— | — | @@ -1,4 +1,4 @@ |
2 | | -ALTER TABLE `uw_collection_contents` |
| 2 | +ALTER TABLE `%dc%_collection_contents` |
3 | 3 | ADD INDEX `versioned_end_collection` (`remove_transaction_id`, `collection_id`, `member_mid`), |
4 | 4 | ADD INDEX `versioned_end_collection_member` (`remove_transaction_id`, `member_mid`, `collection_id`), |
5 | 5 | ADD INDEX `versioned_end_internal_id` (`remove_transaction_id`, `internal_member_id` (255), `collection_id`, `member_mid`), |
Index: trunk/extensions/Wikidata/Database scripts/Convenience/Create uw_option_attribute_values indices.sql |
— | — | @@ -1,4 +1,4 @@ |
2 | | -ALTER TABLE `uw_option_attribute_values` |
| 2 | +ALTER TABLE `%dc%_option_attribute_values` |
3 | 3 | ADD INDEX `versioned_end_object` (`remove_transaction_id`, `object_id`, `option_id`, `value_id`), |
4 | 4 | ADD INDEX `versioned_end_option` (`remove_transaction_id`, `option_id`, `object_id`, `value_id`), |
5 | 5 | ADD INDEX `versioned_end_value` (`remove_transaction_id`, `value_id`), |
Index: trunk/extensions/Wikidata/Database scripts/Convenience/wikidataSourceTables.sql |
— | — | @@ -12,7 +12,7 @@ |
13 | 13 | KEY `versioned_start_meaning` (`add_transaction_id`,`meaning_mid`,`meaning_text_tcid`,`source_id`), |
14 | 14 | KEY `versioned_start_text` (`add_transaction_id`,`meaning_text_tcid`,`meaning_mid`,`source_id`), |
15 | 15 | KEY `versioned_start_source` (`add_transaction_id`,`source_id`,`meaning_mid`,`meaning_text_tcid`) |
16 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
| 16 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
17 | 17 | |
18 | 18 | DROP TABLE IF EXISTS /*$wgWDprefix*/bootstrapped_defined_meanings; |
19 | 19 | |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | `defined_meaning_id` int(11) NOT NULL, |
23 | 23 | KEY `unversioned_meaning` (`defined_meaning_id`), |
24 | 24 | KEY `unversioned_name` (`name`,`defined_meaning_id`) |
25 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 25 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
26 | 26 | |
27 | 27 | INSERT INTO /*$wgWDprefix*/bootstrapped_defined_meanings (name,defined_meaning_id) VALUES |
28 | 28 | ('DefinedMeaning',49), |
— | — | @@ -46,7 +46,7 @@ |
47 | 47 | KEY `versioned_start_class` (`add_transaction_id`,`class_mid`,`attribute_mid`,`object_id`), |
48 | 48 | KEY `versioned_start_attribute` (`add_transaction_id`,`attribute_mid`,`class_mid`,`object_id`), |
49 | 49 | KEY `versioned_start_object` (`add_transaction_id`,`object_id`) |
50 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
| 50 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
51 | 51 | |
52 | 52 | DROP TABLE IF EXISTS /*$wgWDprefix*/class_membership; |
53 | 53 | |
— | — | @@ -62,7 +62,7 @@ |
63 | 63 | KEY `versioned_start_class` (`add_transaction_id`,`class_mid`,`class_member_mid`), |
64 | 64 | KEY `versioned_start_class_member` (`add_transaction_id`,`class_member_mid`,`class_mid`), |
65 | 65 | KEY `versioned_start_class_membership` (`add_transaction_id`,`class_membership_id`) |
66 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
| 66 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
67 | 67 | |
68 | 68 | DROP TABLE IF EXISTS /*$wgWDprefix*/collection_contents; |
69 | 69 | |
— | — | @@ -79,14 +79,14 @@ |
80 | 80 | KEY `versioned_start_collection` (`add_transaction_id`,`collection_id`,`member_mid`), |
81 | 81 | KEY `versioned_start_collection_member` (`add_transaction_id`,`member_mid`,`collection_id`), |
82 | 82 | KEY `versioned_start_internal_id` (`add_transaction_id`,`internal_member_id`,`collection_id`,`member_mid`) |
83 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 83 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
84 | 84 | |
85 | 85 | DROP TABLE IF EXISTS /*$wgWDprefix*/collection_language; |
86 | 86 | |
87 | 87 | CREATE TABLE /*$wgWDprefix*/collection_language ( |
88 | 88 | `collection_id` int(10) NOT NULL default '0', |
89 | 89 | `language_id` int(10) NOT NULL default '0' |
90 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 90 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
91 | 91 | |
92 | 92 | DROP TABLE IF EXISTS /*$wgWDprefix*/collection_ns; |
93 | 93 | |
— | — | @@ -102,7 +102,7 @@ |
103 | 103 | KEY `versioned_start_collection` (`add_transaction_id`,`collection_id`,`collection_mid`), |
104 | 104 | KEY `versioned_start_collection_meaning` (`add_transaction_id`,`collection_mid`,`collection_id`), |
105 | 105 | KEY `versioned_start_collection_type` (`add_transaction_id`,`collection_type`,`collection_id`,`collection_mid`) |
106 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 106 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
107 | 107 | |
108 | 108 | DROP TABLE IF EXISTS /*$wgWDprefix*/defined_meaning; |
109 | 109 | |
— | — | @@ -118,7 +118,7 @@ |
119 | 119 | KEY `versioned_start_meaning` (`add_transaction_id`,`defined_meaning_id`,`expression_id`), |
120 | 120 | KEY `versioned_start_expression` (`add_transaction_id`,`expression_id`,`defined_meaning_id`), |
121 | 121 | KEY `versioned_start_meaning_text` (`add_transaction_id`,`meaning_text_tcid`,`defined_meaning_id`) |
122 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 122 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
123 | 123 | |
124 | 124 | DROP TABLE IF EXISTS /*$wgWDprefix*/expression_ns; |
125 | 125 | |
— | — | @@ -135,7 +135,7 @@ |
136 | 136 | KEY `versioned_start_expression` (`add_transaction_id`,`expression_id`,`language_id`), |
137 | 137 | KEY `versioned_start_language` (`add_transaction_id`,`language_id`,`expression_id`), |
138 | 138 | KEY `versioned_start_spelling` (`add_transaction_id`,`spelling`,`expression_id`,`language_id`) |
139 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 139 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
140 | 140 | |
141 | 141 | DROP TABLE IF EXISTS /*$wgWDprefix*/meaning_relations; |
142 | 142 | |
— | — | @@ -152,7 +152,7 @@ |
153 | 153 | KEY `versioned_start_outgoing` (`add_transaction_id`,`meaning1_mid`,`relationtype_mid`,`meaning2_mid`), |
154 | 154 | KEY `versioned_start_incoming` (`add_transaction_id`,`meaning2_mid`,`relationtype_mid`,`meaning1_mid`), |
155 | 155 | KEY `versioned_start_relation` (`add_transaction_id`,`relation_id`) |
156 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 156 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
157 | 157 | |
158 | 158 | DROP TABLE IF EXISTS /*$wgWDprefix*/objects; |
159 | 159 | |
— | — | @@ -164,7 +164,7 @@ |
165 | 165 | PRIMARY KEY (`object_id`), |
166 | 166 | KEY `table` (`table`), |
167 | 167 | KEY `original_id` (`original_id`) |
168 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
| 168 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
169 | 169 | |
170 | 170 | DROP TABLE IF EXISTS /*$wgWDprefix*/option_attribute_options; |
171 | 171 | |
— | — | @@ -181,7 +181,7 @@ |
182 | 182 | KEY `versioned_start_option` (`add_transaction_id`,`option_mid`,`attribute_id`,`option_id`), |
183 | 183 | KEY `versioned_start_attribute` (`add_transaction_id`,`attribute_id`,`option_id`,`option_mid`), |
184 | 184 | KEY `versioned_start_id` (`add_transaction_id`,`option_id`) |
185 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 185 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
186 | 186 | |
187 | 187 | DROP TABLE IF EXISTS /*$wgWDprefix*/option_attribute_values; |
188 | 188 | |
— | — | @@ -197,7 +197,7 @@ |
198 | 198 | KEY `versioned_start_object` (`add_transaction_id`,`object_id`,`option_id`,`value_id`), |
199 | 199 | KEY `versioned_start_option` (`add_transaction_id`,`option_id`,`object_id`,`value_id`), |
200 | 200 | KEY `versioned_start_value` (`add_transaction_id`,`value_id`) |
201 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 201 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
202 | 202 | |
203 | 203 | DROP TABLE IF EXISTS /*$wgWDprefix*/script_log; |
204 | 204 | |
— | — | @@ -206,7 +206,7 @@ |
207 | 207 | `time` datetime NOT NULL default '0000-00-00 00:00:00', |
208 | 208 | `script_name` varchar(128) collate utf8_bin NOT NULL default '', |
209 | 209 | `comment` varchar(128) collate utf8_bin NOT NULL default '' |
210 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 210 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
211 | 211 | |
212 | 212 | DROP TABLE IF EXISTS /*$wgWDprefix*/syntrans; |
213 | 213 | |
— | — | @@ -224,7 +224,7 @@ |
225 | 225 | KEY `versioned_start_syntrans` (`add_transaction_id`,`syntrans_sid`), |
226 | 226 | KEY `versioned_start_expression` (`add_transaction_id`,`expression_id`,`identical_meaning`,`defined_meaning_id`), |
227 | 227 | KEY `versioned_start_defined_meaning` (`add_transaction_id`,`defined_meaning_id`,`identical_meaning`,`expression_id`) |
228 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 228 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
229 | 229 | |
230 | 230 | DROP TABLE IF EXISTS /*$wgWDprefix*/syntrans_relations; |
231 | 231 | |
— | — | @@ -232,7 +232,7 @@ |
233 | 233 | `syntrans1_id` int(10) NOT NULL, |
234 | 234 | `syntrans2_id` int(10) NOT NULL, |
235 | 235 | `relationtype_mid` int(10) default NULL |
236 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 236 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
237 | 237 | |
238 | 238 | DROP TABLE IF EXISTS /*$wgWDprefix*/text; |
239 | 239 | |
— | — | @@ -241,7 +241,7 @@ |
242 | 242 | `text_text` mediumblob NOT NULL, |
243 | 243 | `text_flags` tinyblob, |
244 | 244 | PRIMARY KEY (`text_id`) |
245 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 245 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
246 | 246 | |
247 | 247 | DROP TABLE IF EXISTS /*$wgWDprefix*/text_attribute_values; |
248 | 248 | |
— | — | @@ -258,7 +258,7 @@ |
259 | 259 | KEY `versioned_start_object` (`add_transaction_id`,`object_id`,`attribute_mid`,`value_id`), |
260 | 260 | KEY `versioned_start_attribute` (`add_transaction_id`,`attribute_mid`,`object_id`,`value_id`), |
261 | 261 | KEY `versioned_start_value` (`add_transaction_id`,`value_id`) |
262 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
| 262 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
263 | 263 | |
264 | 264 | DROP TABLE IF EXISTS /*$wgWDprefix*/transactions; |
265 | 265 | |
— | — | @@ -270,7 +270,7 @@ |
271 | 271 | `comment` tinyblob NOT NULL, |
272 | 272 | PRIMARY KEY (`transaction_id`), |
273 | 273 | KEY `user` (`user_id`,`transaction_id`) |
274 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
| 274 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
275 | 275 | |
276 | 276 | DROP TABLE IF EXISTS /*$wgWDprefix*/translated_content; |
277 | 277 | |
— | — | @@ -286,7 +286,7 @@ |
287 | 287 | KEY `versioned_end_text` (`remove_transaction_id`,`text_id`,`translated_content_id`,`language_id`), |
288 | 288 | KEY `versioned_start_translated_content` (`add_transaction_id`,`translated_content_id`,`language_id`,`text_id`), |
289 | 289 | KEY `versioned_start_text` (`add_transaction_id`,`text_id`,`translated_content_id`,`language_id`) |
290 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 290 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
291 | 291 | |
292 | 292 | DROP TABLE IF EXISTS /*$wgWDprefix*/translated_content_attribute_values; |
293 | 293 | |
— | — | @@ -305,7 +305,7 @@ |
306 | 306 | KEY `versioned_start_attribute` (`add_transaction_id`,`attribute_mid`,`object_id`,`value_tcid`), |
307 | 307 | KEY `versioned_start_translated_content` (`add_transaction_id`,`value_tcid`,`value_id`), |
308 | 308 | KEY `versioned_start_value` (`add_transaction_id`,`value_id`) |
309 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
| 309 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
310 | 310 | |
311 | 311 | DROP TABLE IF EXISTS /*$wgWDprefix*/url_attribute_values; |
312 | 312 | |
— | — | @@ -323,4 +323,4 @@ |
324 | 324 | KEY `versioned_start_object` (`add_transaction_id`,`object_id`,`attribute_mid`,`value_id`), |
325 | 325 | KEY `versioned_start_attribute` (`add_transaction_id`,`attribute_mid`,`object_id`,`value_id`), |
326 | 326 | KEY `versioned_start_value` (`add_transaction_id`,`value_id`) |
327 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
| 327 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
Index: trunk/extensions/Wikidata/Database scripts/Convenience/Create wikidata.php |
— | — | @@ -3,12 +3,9 @@ |
4 | 4 | # this module create a wikidata extension for mediawiki |
5 | 5 | # it generates the tables in a database (passed as parameter) with a defined prefix (passed as parameter) |
6 | 6 | |
7 | | -define('MEDIAWIKI', true ); |
8 | | - |
9 | 7 | $wgUseMasterForMaintenance = true; |
10 | | -require_once( "../../../../LocalSettings.php"); |
11 | 8 | require_once( "../../../../maintenance/commandLine.inc"); |
12 | | -require_once( "../../OmegaWiki/WikiDataAPI.php"); |
| 9 | +#require_once( "../../../../LocalSettings.php"); |
13 | 10 | #require_once( "install-utils.inc" ); |
14 | 11 | #require_once( "AdminSettings.php"); |
15 | 12 | #require_once( "GlobalFunctions.php" ); |
— | — | @@ -127,9 +124,15 @@ |
128 | 125 | |
129 | 126 | ReadSQLFile( $wdDatabase, "/*\$wgWDprefix*/", $wgWDprefix, $wgWDtemplate ); |
130 | 127 | $wdDatabase->query( "DELETE FROM wikidata_sets WHERE set_prefix = '$prefix'" ); |
131 | | -$wdDatabase->query( "INSERT INTO wikidata_sets (set_prefix,set_fallback_name,set_dmid) VALUES ('$prefix','$comment',0)" ); |
132 | | -bootstrapCollection("datasets",85,"MAPP",$wgWDprefix); |
| 128 | +$wdDatabase->query( "INSERT INTO wikidata_sets (set_prefix,set_fallback_name,set_dmid) VALUES ('$prefix','$comment',0)" );
|
133 | 129 | |
| 130 | +$queryResult = $wdDatabase->query( "SELECT user_name FROM user WHERE user_real_name = '$prefix'" );
|
| 131 | +if ( $row = $wdDatabase->fetchObject( $queryResult ) ){
|
| 132 | + echo "user already existed";
|
| 133 | +}
|
| 134 | +else{
|
| 135 | + $wdDatabase->query( "INSERT INTO user (user_name,user_real_name,user_password,user_newpassword,user_email,user_options) VALUES ('$comment','$prefix','','','','')" );
|
| 136 | +}
|
134 | 137 | $wdDatabase->close(); |
135 | 138 | |
136 | | -?> |
| 139 | +?> |
\ No newline at end of file |
Index: trunk/extensions/Wikidata/Database scripts/Convenience/Create uw_class_attributes indices.sql |
— | — | @@ -1,4 +1,4 @@ |
2 | | -ALTER TABLE `uw_class_attributes` |
| 2 | +ALTER TABLE `%dc%_class_attributes` |
3 | 3 | ADD INDEX `versioned_end_class` (`remove_transaction_id`, `class_mid`, `attribute_mid`, `object_id`), |
4 | 4 | ADD INDEX `versioned_end_attribute` (`remove_transaction_id`, `attribute_mid`, `class_mid`, `object_id`), |
5 | 5 | ADD INDEX `versioned_end_object` (`remove_transaction_id`, `object_id`), |
Index: trunk/extensions/Wikidata/Database scripts/Convenience/Create uw_class_membership indices.sql |
— | — | @@ -1,4 +1,4 @@ |
2 | | -ALTER TABLE `uw_class_membership` |
| 2 | +ALTER TABLE `%dc%_class_membership` |
3 | 3 | ADD INDEX `versioned_end_class` (`remove_transaction_id`, `class_mid`, `class_member_mid`), |
4 | 4 | ADD INDEX `versioned_end_class_member` (`remove_transaction_id`, `class_member_mid`, `class_mid`), |
5 | 5 | ADD INDEX `versioned_end_class_membership` (`remove_transaction_id`, `class_membership_id`), |
Index: trunk/extensions/Wikidata/Database scripts/Convenience/Create uw_syntrans indices.sql |
— | — | @@ -1,4 +1,4 @@ |
2 | | -ALTER TABLE `uw_syntrans` |
| 2 | +ALTER TABLE `%dc%_syntrans` |
3 | 3 | ADD INDEX `versioned_end_syntrans` (`remove_transaction_id`, `syntrans_sid`), |
4 | 4 | ADD INDEX `versioned_end_expression` (`remove_transaction_id`, `expression_id`, `identical_meaning`, `defined_meaning_id`), |
5 | 5 | ADD INDEX `versioned_end_defined_meaning` (`remove_transaction_id`, `defined_meaning_id`, `identical_meaning`, `expression_id`), |
Index: trunk/extensions/Wikidata/Database scripts/Convenience/create wikidata.sql |
— | — | @@ -2,11 +2,11 @@ |
3 | 3 | -- Add the wikidata specific namespaces |
4 | 4 | -- |
5 | 5 | |
6 | | -INSERT INTO `namespace` (`ns_id`,`ns_system`,`ns_subpages`,`ns_search_default`,`ns_target`,`ns_parent`,`ns_hidden`,`ns_count`,`ns_class`) VALUES |
7 | | - (16,NULL,0,0,'',NULL,0,'OmegaWiki',1); |
8 | | - (17,NULL,1,0,'',16,0,NULL,NULL), |
9 | | - (24,NULL,0,0,'',NULL,0,'DefinedMeaning',1); |
10 | | - (25,NULL,1,0,'',24,0,NULL,NULL); |
| 6 | +INSERT INTO `namespace` (`ns_id`,`ns_parent`,`ns_system`) VALUES |
| 7 | + (16,NULL,'OmegaWiki'), |
| 8 | + (17,16, NULL), |
| 9 | + (24,NULL,'DefinedMeaning'), |
| 10 | + (25,24, NULL); |
11 | 11 | |
12 | 12 | INSERT INTO `namespace_names` (`ns_id`,`ns_name`,`ns_default`,`ns_canonical`) VALUES |
13 | 13 | (16,'Expression',1,0), |
— | — | @@ -26,7 +26,7 @@ |
27 | 27 | `iso639_3` varchar(10) collate latin1_general_ci NOT NULL default '', |
28 | 28 | `wikimedia_key` varchar(10) collate latin1_general_ci NOT NULL default '', |
29 | 29 | PRIMARY KEY (`language_id`) |
30 | | -) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; |
| 30 | +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; |
31 | 31 | |
32 | 32 | INSERT INTO `language` (`language_id`,`dialect_of_lid`,`iso639_2`,`iso639_3`,`wikimedia_key`) VALUES |
33 | 33 | (84,0,'','','bg'), |
— | — | @@ -65,7 +65,7 @@ |
66 | 66 | `language_name` varchar(255) NOT NULL default '', |
67 | 67 | PRIMARY KEY (`language_id`,`name_language_id`), |
68 | 68 | KEY `language_id` (`language_id`) |
69 | | -) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
| 69 | +) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
70 | 70 | |
71 | 71 | -- |
72 | 72 | -- Dumping data for table `language_names` |
— | — | @@ -130,7 +130,7 @@ |
131 | 131 | `source_id` int(11) NOT NULL default '0', |
132 | 132 | `add_transaction_id` int(11) NOT NULL, |
133 | 133 | `remove_transaction_id` int(11) default NULL |
134 | | -) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; |
| 134 | +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; |
135 | 135 | |
136 | 136 | -- |
137 | 137 | -- Definition of table `uw_bootstrapped_defined_meanings` |
— | — | @@ -140,7 +140,7 @@ |
141 | 141 | CREATE TABLE `uw_bootstrapped_defined_meanings` ( |
142 | 142 | `name` varchar(255) NOT NULL, |
143 | 143 | `defined_meaning_id` int(11) NOT NULL |
144 | | -) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
| 144 | +) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
145 | 145 | |
146 | 146 | INSERT INTO `uw_bootstrapped_defined_meanings` (`name`,`defined_meaning_id`) VALUES |
147 | 147 | ('DefinedMeaning',49), |
— | — | @@ -163,7 +163,7 @@ |
164 | 164 | `attribute_type` char(4) collate latin1_general_ci NOT NULL default 'TEXT', |
165 | 165 | `add_transaction_id` int(11) NOT NULL, |
166 | 166 | `remove_transaction_id` int(11) default NULL |
167 | | -) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; |
| 167 | +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; |
168 | 168 | |
169 | 169 | -- |
170 | 170 | -- Definition of table `uw_class_membership` |
— | — | @@ -176,7 +176,7 @@ |
177 | 177 | `class_member_mid` int(11) NOT NULL default '0', |
178 | 178 | `add_transaction_id` int(11) NOT NULL, |
179 | 179 | `remove_transaction_id` int(11) default NULL |
180 | | -) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; |
| 180 | +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; |
181 | 181 | |
182 | 182 | -- |
183 | 183 | -- Definition of table `uw_collection_contents` |
— | — | @@ -190,7 +190,7 @@ |
191 | 191 | `applicable_language_id` int(10) default NULL, |
192 | 192 | `add_transaction_id` int(11) NOT NULL, |
193 | 193 | `remove_transaction_id` int(11) default NULL |
194 | | -) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
| 194 | +) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
195 | 195 | |
196 | 196 | -- |
197 | 197 | -- Definition of table `uw_collection_language` |
— | — | @@ -200,7 +200,7 @@ |
201 | 201 | CREATE TABLE `uw_collection_language` ( |
202 | 202 | `collection_id` int(10) NOT NULL default '0', |
203 | 203 | `language_id` int(10) NOT NULL default '0' |
204 | | -) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
| 204 | +) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
205 | 205 | |
206 | 206 | -- |
207 | 207 | -- Definition of table `uw_collection_ns` |
— | — | @@ -213,7 +213,7 @@ |
214 | 214 | `collection_type` char(4) default NULL, |
215 | 215 | `add_transaction_id` int(11) NOT NULL, |
216 | 216 | `remove_transaction_id` int(11) default NULL |
217 | | -) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
| 217 | +) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
218 | 218 | |
219 | 219 | -- |
220 | 220 | -- Definition of table `uw_defined_meaning` |
— | — | @@ -226,7 +226,7 @@ |
227 | 227 | `meaning_text_tcid` int(10) NOT NULL default '0', |
228 | 228 | `add_transaction_id` int(11) NOT NULL, |
229 | 229 | `remove_transaction_id` int(11) default NULL |
230 | | -) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
| 230 | +) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
231 | 231 | |
232 | 232 | -- |
233 | 233 | -- Definition of table `uw_expression_ns` |
— | — | @@ -240,7 +240,7 @@ |
241 | 241 | `language_id` int(10) NOT NULL default '0', |
242 | 242 | `add_transaction_id` int(11) NOT NULL, |
243 | 243 | `remove_transaction_id` int(11) default NULL |
244 | | -) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
| 244 | +) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
245 | 245 | |
246 | 246 | -- |
247 | 247 | -- Definition of table `uw_meaning_relations` |
— | — | @@ -254,7 +254,7 @@ |
255 | 255 | `relationtype_mid` int(10) default NULL, |
256 | 256 | `add_transaction_id` int(11) NOT NULL, |
257 | 257 | `remove_transaction_id` int(11) default NULL |
258 | | -) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
| 258 | +) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
259 | 259 | |
260 | 260 | -- |
261 | 261 | -- Definition of table `uw_objects` |
— | — | @@ -269,7 +269,7 @@ |
270 | 270 | PRIMARY KEY (`object_id`), |
271 | 271 | KEY `table` (`table`), |
272 | 272 | KEY `original_id` (`original_id`) |
273 | | -) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; |
| 273 | +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; |
274 | 274 | |
275 | 275 | -- |
276 | 276 | -- Definition of table `uw_option_attribute_options` |
— | — | @@ -283,7 +283,7 @@ |
284 | 284 | `language_id` int(11) NOT NULL default '0', |
285 | 285 | `add_transaction_id` int(11) NOT NULL default '0', |
286 | 286 | `remove_transaction_id` int(11) default NULL |
287 | | -) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
| 287 | +) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
288 | 288 | |
289 | 289 | -- |
290 | 290 | -- Definition of table `uw_option_attribute_values` |
— | — | @@ -296,7 +296,7 @@ |
297 | 297 | `option_id` int(11) NOT NULL default '0', |
298 | 298 | `add_transaction_id` int(11) NOT NULL default '0', |
299 | 299 | `remove_transaction_id` int(11) default NULL |
300 | | -) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
| 300 | +) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
301 | 301 | |
302 | 302 | -- |
303 | 303 | -- Definition of table `uw_script_log` |
— | — | @@ -308,7 +308,7 @@ |
309 | 309 | `time` datetime NOT NULL default '0000-00-00 00:00:00', |
310 | 310 | `script_name` varchar(128) character set latin1 collate latin1_general_ci NOT NULL default '', |
311 | 311 | `comment` varchar(128) character set latin1 collate latin1_general_ci NOT NULL default '' |
312 | | -) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
| 312 | +) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
313 | 313 | |
314 | 314 | -- |
315 | 315 | -- Definition of table `uw_syntrans` |
— | — | @@ -323,7 +323,7 @@ |
324 | 324 | `identical_meaning` tinyint(1) NOT NULL default '0', |
325 | 325 | `add_transaction_id` int(11) NOT NULL, |
326 | 326 | `remove_transaction_id` int(11) default NULL |
327 | | -) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
| 327 | +) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
328 | 328 | |
329 | 329 | -- |
330 | 330 | -- Definition of table `uw_syntrans_relations` |
— | — | @@ -334,7 +334,7 @@ |
335 | 335 | `syntrans1_id` int(10) NOT NULL, |
336 | 336 | `syntrans2_id` int(10) NOT NULL, |
337 | 337 | `relationtype_mid` int(10) default NULL |
338 | | -) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
| 338 | +) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
339 | 339 | |
340 | 340 | -- |
341 | 341 | -- Definition of table `uw_text` |
— | — | @@ -346,7 +346,7 @@ |
347 | 347 | `text_text` mediumblob NOT NULL, |
348 | 348 | `text_flags` tinyblob NOT NULL, |
349 | 349 | PRIMARY KEY (`text_id`) |
350 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 350 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
351 | 351 | |
352 | 352 | -- |
353 | 353 | -- Definition of table `uw_text_attribute_values` |
— | — | @@ -360,7 +360,7 @@ |
361 | 361 | `text` varchar(255) collate latin1_general_ci NOT NULL, |
362 | 362 | `add_transaction_id` int(11) NOT NULL, |
363 | 363 | `remove_transaction_id` int(11) default NULL |
364 | | -) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; |
| 364 | +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; |
365 | 365 | |
366 | 366 | -- |
367 | 367 | -- Definition of table `uw_transactions` |
— | — | @@ -374,7 +374,7 @@ |
375 | 375 | `timestamp` varchar(14) collate latin1_general_ci NOT NULL, |
376 | 376 | `comment` tinyblob NOT NULL, |
377 | 377 | PRIMARY KEY (`transaction_id`) |
378 | | -) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; |
| 378 | +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; |
379 | 379 | |
380 | 380 | -- |
381 | 381 | -- Definition of table `uw_translated_content` |
— | — | @@ -389,7 +389,7 @@ |
390 | 390 | `original_language_id` int(10) NOT NULL default '0', |
391 | 391 | `add_transaction_id` int(11) NOT NULL, |
392 | 392 | `remove_transaction_id` int(11) default NULL |
393 | | -) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
| 393 | +) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
394 | 394 | |
395 | 395 | -- |
396 | 396 | -- Definition of table `uw_translated_content_attribute_values` |
— | — | @@ -403,7 +403,7 @@ |
404 | 404 | `value_tcid` int(11) NOT NULL, |
405 | 405 | `add_transaction_id` int(11) NOT NULL, |
406 | 406 | `remove_transaction_id` int(11) default NULL |
407 | | -) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; |
| 407 | +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; |
408 | 408 | |
409 | 409 | -- |
410 | 410 | -- Definition of table `uw_url_attribute_values` |
— | — | @@ -418,7 +418,7 @@ |
419 | 419 | `label` varchar(255) collate latin1_general_ci NOT NULL, |
420 | 420 | `add_transaction_id` int(11) NOT NULL, |
421 | 421 | `remove_transaction_id` int(11) default NULL |
422 | | -) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; |
| 422 | +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; |
423 | 423 | |
424 | 424 | -- |
425 | 425 | -- Definition of table `wikidata_sets` |
— | — | @@ -429,7 +429,7 @@ |
430 | 430 | `set_prefix` varchar(20) default NULL, |
431 | 431 | `set_string` varchar(100) default NULL, |
432 | 432 | `set_dmid` int(10) default NULL |
433 | | -) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
| 433 | +) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
434 | 434 | |
435 | 435 | INSERT INTO `wikidata_sets` (`set_prefix`,`set_string`,`set_dmid`) VALUES |
436 | 436 | ('uw','OmegaWiki community',0), |
Index: trunk/extensions/Wikidata/Database scripts/Convenience/Create uw_text_attribute_values indices.sql |
— | — | @@ -1,4 +1,4 @@ |
2 | | -ALTER TABLE `uw_text_attribute_values` |
| 2 | +ALTER TABLE `%dc%_text_attribute_values` |
3 | 3 | ADD INDEX `versioned_end_object` (`remove_transaction_id`, `object_id`, `attribute_mid`, `value_id`), |
4 | 4 | ADD INDEX `versioned_end_attribute` (`remove_transaction_id`, `attribute_mid`, `object_id`, `value_id`), |
5 | 5 | ADD INDEX `versioned_end_value` (`remove_transaction_id`, `value_id`), |
Index: trunk/extensions/Wikidata/Database scripts/Convenience/create mediawiki.sql |
— | — | @@ -16,7 +16,7 @@ |
17 | 17 | `ar_rev_id` int(8) unsigned default NULL, |
18 | 18 | `ar_text_id` int(8) unsigned default NULL, |
19 | 19 | KEY `name_title_timestamp` (`ar_namespace`,`ar_title`,`ar_timestamp`) |
20 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 20 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
21 | 21 | |
22 | 22 | -- |
23 | 23 | -- Definition of table `categorylinks` |
— | — | @@ -31,7 +31,7 @@ |
32 | 32 | UNIQUE KEY `cl_from` (`cl_from`,`cl_to`), |
33 | 33 | KEY `cl_sortkey` (`cl_to`,`cl_sortkey`), |
34 | 34 | KEY `cl_timestamp` (`cl_to`,`cl_timestamp`) |
35 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 35 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
36 | 36 | |
37 | 37 | -- |
38 | 38 | -- Definition of table `externallinks` |
— | — | @@ -45,7 +45,7 @@ |
46 | 46 | KEY `el_from` (`el_from`,`el_to`(40)), |
47 | 47 | KEY `el_to` (`el_to`(60),`el_from`), |
48 | 48 | KEY `el_index` (`el_index`(60)) |
49 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 49 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
50 | 50 | |
51 | 51 | -- |
52 | 52 | -- Definition of table `filearchive` |
— | — | @@ -78,7 +78,7 @@ |
79 | 79 | KEY `fa_storage_group` (`fa_storage_group`,`fa_storage_key`), |
80 | 80 | KEY `fa_deleted_timestamp` (`fa_deleted_timestamp`), |
81 | 81 | KEY `fa_deleted_user` (`fa_deleted_user`) |
82 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 82 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
83 | 83 | |
84 | 84 | -- |
85 | 85 | -- Definition of table `hitcounter` |
— | — | @@ -111,7 +111,7 @@ |
112 | 112 | PRIMARY KEY (`img_name`), |
113 | 113 | KEY `img_size` (`img_size`), |
114 | 114 | KEY `img_timestamp` (`img_timestamp`) |
115 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 115 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
116 | 116 | |
117 | 117 | -- |
118 | 118 | -- Definition of table `imagelinks` |
— | — | @@ -123,7 +123,7 @@ |
124 | 124 | `il_to` varchar(255) character set latin1 collate latin1_bin NOT NULL default '', |
125 | 125 | UNIQUE KEY `il_from` (`il_from`,`il_to`), |
126 | 126 | KEY `il_to` (`il_to`,`il_from`) |
127 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 127 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
128 | 128 | |
129 | 129 | -- |
130 | 130 | -- Definition of table `interwiki` |
— | — | @@ -136,7 +136,7 @@ |
137 | 137 | `iw_local` tinyint(1) NOT NULL default '0', |
138 | 138 | `iw_trans` tinyint(1) NOT NULL default '0', |
139 | 139 | UNIQUE KEY `iw_prefix` (`iw_prefix`) |
140 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 140 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
141 | 141 | |
142 | 142 | -- |
143 | 143 | -- Dumping data for table `interwiki` |
— | — | @@ -358,7 +358,7 @@ |
359 | 359 | KEY `ipb_range` (`ipb_range_start`(8),`ipb_range_end`(8)), |
360 | 360 | KEY `ipb_timestamp` (`ipb_timestamp`), |
361 | 361 | KEY `ipb_expiry` (`ipb_expiry`) |
362 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 362 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
363 | 363 | |
364 | 364 | -- |
365 | 365 | -- Definition of table `job` |
— | — | @@ -373,7 +373,7 @@ |
374 | 374 | `job_params` blob NOT NULL, |
375 | 375 | PRIMARY KEY (`job_id`), |
376 | 376 | KEY `job_cmd` (`job_cmd`,`job_namespace`,`job_title`) |
377 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 377 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
378 | 378 | |
379 | 379 | -- |
380 | 380 | -- Definition of table `langlinks` |
— | — | @@ -386,7 +386,7 @@ |
387 | 387 | `ll_title` varchar(255) character set latin1 collate latin1_bin NOT NULL default '', |
388 | 388 | UNIQUE KEY `ll_from` (`ll_from`,`ll_lang`), |
389 | 389 | KEY `ll_lang` (`ll_lang`,`ll_title`) |
390 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 390 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
391 | 391 | |
392 | 392 | -- |
393 | 393 | -- Definition of table `logging` |
— | — | @@ -408,7 +408,7 @@ |
409 | 409 | KEY `user_time` (`log_user`,`log_timestamp`), |
410 | 410 | KEY `page_time` (`log_namespace`,`log_title`,`log_timestamp`), |
411 | 411 | KEY `times` (`log_timestamp`) |
412 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 412 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
413 | 413 | |
414 | 414 | -- |
415 | 415 | -- Definition of table `math` |
— | — | @@ -422,7 +422,7 @@ |
423 | 423 | `math_html` text, |
424 | 424 | `math_mathml` text, |
425 | 425 | UNIQUE KEY `math_inputhash` (`math_inputhash`) |
426 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 426 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
427 | 427 | |
428 | 428 | -- |
429 | 429 | -- Definition of table `namespace` |
— | — | @@ -440,7 +440,7 @@ |
441 | 441 | `ns_class` varchar(100) default NULL, |
442 | 442 | `ns_count` tinyint(1) default NULL, |
443 | 443 | PRIMARY KEY (`ns_id`) |
444 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 444 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
445 | 445 | |
446 | 446 | -- |
447 | 447 | -- Dumping data for table `namespace` |
— | — | @@ -481,7 +481,7 @@ |
482 | 482 | `ns_canonical` tinyint(1) default NULL, |
483 | 483 | UNIQUE KEY `ns_name` (`ns_name`), |
484 | 484 | KEY `ns_id` (`ns_id`) |
485 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 485 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
486 | 486 | |
487 | 487 | -- |
488 | 488 | -- Dumping data for table `namespace_names` |
— | — | @@ -528,7 +528,7 @@ |
529 | 529 | `exptime` datetime default NULL, |
530 | 530 | UNIQUE KEY `keyname` (`keyname`), |
531 | 531 | KEY `exptime` (`exptime`) |
532 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 532 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
533 | 533 | |
534 | 534 | -- |
535 | 535 | -- Table structure for table `objects` |
— | — | @@ -543,7 +543,7 @@ |
544 | 544 | PRIMARY KEY (`object_id`), |
545 | 545 | KEY `table` (`table`), |
546 | 546 | KEY `original_id` (`original_id`) |
547 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 547 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
548 | 548 | |
549 | 549 | -- |
550 | 550 | -- Definition of table `oldimage` |
— | — | @@ -562,7 +562,7 @@ |
563 | 563 | `oi_user_text` varchar(255) character set latin1 collate latin1_bin NOT NULL default '', |
564 | 564 | `oi_timestamp` varchar(14) character set latin1 collate latin1_bin NOT NULL default '', |
565 | 565 | KEY `oi_name` (`oi_name`(10)) |
566 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 566 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
567 | 567 | |
568 | 568 | -- |
569 | 569 | -- Definition of table `page` |
— | — | @@ -585,7 +585,7 @@ |
586 | 586 | KEY `page_random` (`page_random`), |
587 | 587 | KEY `page_len` (`page_len`), |
588 | 588 | KEY `name_title` (`page_namespace`,`page_title`) |
589 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 589 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
590 | 590 | |
591 | 591 | -- |
592 | 592 | -- Dumping data for table `page` |
— | — | @@ -614,7 +614,7 @@ |
615 | 615 | KEY `pr_typelevel` (`pr_type`,`pr_level`), |
616 | 616 | KEY `pr_level` (`pr_level`), |
617 | 617 | KEY `pr_cascade` (`pr_cascade`) |
618 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 618 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
619 | 619 | |
620 | 620 | -- |
621 | 621 | -- Definition of table `pagelinks` |
— | — | @@ -627,7 +627,7 @@ |
628 | 628 | `pl_title` varchar(255) character set latin1 collate latin1_bin NOT NULL default '', |
629 | 629 | UNIQUE KEY `pl_from` (`pl_from`,`pl_namespace`,`pl_title`), |
630 | 630 | KEY `pl_namespace` (`pl_namespace`,`pl_title`,`pl_from`) |
631 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 631 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
632 | 632 | |
633 | 633 | -- |
634 | 634 | -- Definition of table `querycache` |
— | — | @@ -640,7 +640,7 @@ |
641 | 641 | `qc_namespace` int(11) NOT NULL default '0', |
642 | 642 | `qc_title` char(255) character set latin1 collate latin1_bin NOT NULL default '', |
643 | 643 | KEY `qc_type` (`qc_type`,`qc_value`) |
644 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 644 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
645 | 645 | |
646 | 646 | -- |
647 | 647 | -- Definition of table `querycache_info` |
— | — | @@ -651,7 +651,7 @@ |
652 | 652 | `qci_type` varchar(32) NOT NULL default '', |
653 | 653 | `qci_timestamp` char(14) NOT NULL default '19700101000000', |
654 | 654 | UNIQUE KEY `qci_type` (`qci_type`) |
655 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 655 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
656 | 656 | |
657 | 657 | -- |
658 | 658 | -- Definition of table `querycachetwo` |
— | — | @@ -668,7 +668,7 @@ |
669 | 669 | KEY `qcc_type` (`qcc_type`,`qcc_value`), |
670 | 670 | KEY `qcc_title` (`qcc_type`,`qcc_namespace`,`qcc_title`), |
671 | 671 | KEY `qcc_titletwo` (`qcc_type`,`qcc_namespacetwo`,`qcc_titletwo`) |
672 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 672 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
673 | 673 | |
674 | 674 | -- |
675 | 675 | -- Definition of table `recentchanges` |
— | — | @@ -705,7 +705,7 @@ |
706 | 706 | KEY `rc_ip` (`rc_ip`), |
707 | 707 | KEY `rc_ns_usertext` (`rc_namespace`,`rc_user_text`), |
708 | 708 | KEY `rc_user_text` (`rc_user_text`,`rc_timestamp`) |
709 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 709 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
710 | 710 | |
711 | 711 | -- |
712 | 712 | -- Definition of table `redirect` |
— | — | @@ -718,7 +718,7 @@ |
719 | 719 | `rd_title` varchar(255) character set latin1 collate latin1_bin NOT NULL default '', |
720 | 720 | PRIMARY KEY (`rd_from`), |
721 | 721 | KEY `rd_ns_title` (`rd_namespace`,`rd_title`,`rd_from`) |
722 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 722 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
723 | 723 | |
724 | 724 | |
725 | 725 | -- |
— | — | @@ -742,7 +742,7 @@ |
743 | 743 | KEY `page_timestamp` (`rev_page`,`rev_timestamp`), |
744 | 744 | KEY `user_timestamp` (`rev_user`,`rev_timestamp`), |
745 | 745 | KEY `usertext_timestamp` (`rev_user_text`,`rev_timestamp`) |
746 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 746 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
747 | 747 | |
748 | 748 | -- |
749 | 749 | -- Dumping data for table `revision` |
— | — | @@ -783,7 +783,7 @@ |
784 | 784 | `ss_admins` int(10) default '-1', |
785 | 785 | `ss_images` int(10) default '0', |
786 | 786 | UNIQUE KEY `ss_row_id` (`ss_row_id`) |
787 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 787 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
788 | 788 | |
789 | 789 | -- |
790 | 790 | -- Dumping data for table `site_stats` |
— | — | @@ -806,7 +806,7 @@ |
807 | 807 | `tl_title` varchar(255) character set latin1 collate latin1_bin NOT NULL default '', |
808 | 808 | UNIQUE KEY `tl_from` (`tl_from`,`tl_namespace`,`tl_title`), |
809 | 809 | KEY `tl_namespace` (`tl_namespace`,`tl_title`,`tl_from`) |
810 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 810 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
811 | 811 | |
812 | 812 | -- |
813 | 813 | -- Definition of table `text` |
— | — | @@ -818,7 +818,7 @@ |
819 | 819 | `old_text` mediumblob NOT NULL, |
820 | 820 | `old_flags` tinyblob, |
821 | 821 | PRIMARY KEY (`old_id`) |
822 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 822 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
823 | 823 | |
824 | 824 | -- |
825 | 825 | -- Dumping data for table `text` |
— | — | @@ -844,7 +844,7 @@ |
845 | 845 | `tb_name` varchar(255) default NULL, |
846 | 846 | PRIMARY KEY (`tb_id`), |
847 | 847 | KEY `tb_page` (`tb_page`) |
848 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 848 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
849 | 849 | |
850 | 850 | -- |
851 | 851 | -- Definition of table `transcache` |
— | — | @@ -856,7 +856,7 @@ |
857 | 857 | `tc_contents` text, |
858 | 858 | `tc_time` int(11) NOT NULL default '0', |
859 | 859 | UNIQUE KEY `tc_url_idx` (`tc_url`) |
860 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 860 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
861 | 861 | |
862 | 862 | -- |
863 | 863 | -- Definition of table `user` |
— | — | @@ -882,7 +882,7 @@ |
883 | 883 | PRIMARY KEY (`user_id`), |
884 | 884 | UNIQUE KEY `user_name` (`user_name`), |
885 | 885 | KEY `user_email_token` (`user_email_token`) |
886 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 886 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
887 | 887 | |
888 | 888 | -- |
889 | 889 | -- Dumping data for table `user` |
— | — | @@ -904,7 +904,7 @@ |
905 | 905 | `ug_group` char(16) NOT NULL default '', |
906 | 906 | PRIMARY KEY (`ug_user`,`ug_group`), |
907 | 907 | KEY `ug_group` (`ug_group`) |
908 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 908 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
909 | 909 | |
910 | 910 | -- |
911 | 911 | -- Dumping data for table `user_groups` |
— | — | @@ -927,7 +927,7 @@ |
928 | 928 | `user_ip` varchar(40) NOT NULL default '', |
929 | 929 | KEY `user_id` (`user_id`), |
930 | 930 | KEY `user_ip` (`user_ip`) |
931 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 931 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
932 | 932 | |
933 | 933 | -- |
934 | 934 | -- Definition of table `watchlist` |
— | — | @@ -941,4 +941,4 @@ |
942 | 942 | `wl_notificationtimestamp` varchar(14) character set latin1 collate latin1_bin default NULL, |
943 | 943 | UNIQUE KEY `wl_user` (`wl_user`,`wl_namespace`,`wl_title`), |
944 | 944 | KEY `namespace_title` (`wl_namespace`,`wl_title`) |
945 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 945 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
Index: trunk/extensions/Wikidata/Database scripts/Convenience/Create uw_collection_ns indices.sql |
— | — | @@ -1,4 +1,4 @@ |
2 | | -ALTER TABLE `uw_collection_ns` |
| 2 | +ALTER TABLE `%dc%_collection_ns` |
3 | 3 | ADD INDEX `versioned_end_collection` (`remove_transaction_id`, `collection_id`, `collection_mid`), |
4 | 4 | ADD INDEX `versioned_end_collection_meaning` (`remove_transaction_id`, `collection_mid`, `collection_id`), |
5 | 5 | ADD INDEX `versioned_end_collection_type` (`remove_transaction_id`, `collection_type` (4), `collection_id`, `collection_mid`), |
Index: trunk/extensions/Wikidata/Database scripts/Convenience/Create uw_defined_meaning indices.sql |
— | — | @@ -1,4 +1,4 @@ |
2 | | -ALTER TABLE `uw_defined_meaning` |
| 2 | +ALTER TABLE `%dc%_defined_meaning` |
3 | 3 | ADD INDEX `versioned_end_meaning` (`remove_transaction_id`, `defined_meaning_id`, `expression_id`), |
4 | 4 | ADD INDEX `versioned_end_expression` (`remove_transaction_id`, `expression_id`, `defined_meaning_id`), |
5 | 5 | ADD INDEX `versioned_end_meaning_text` (`remove_transaction_id`, `meaning_text_tcid`, `defined_meaning_id`), |
Index: trunk/extensions/Wikidata/Database scripts/Convenience/Create uw_translated_content_attribute_values indices.sql |
— | — | @@ -1,4 +1,4 @@ |
2 | | -ALTER TABLE `uw_translated_content_attribute_values` |
| 2 | +ALTER TABLE `%dc%_translated_content_attribute_values` |
3 | 3 | ADD INDEX `versioned_end_object` (`remove_transaction_id`, `object_id`, `attribute_mid`, `value_tcid`), |
4 | 4 | ADD INDEX `versioned_end_attribute` (`remove_transaction_id`, `attribute_mid`, `object_id`, `value_tcid`), |
5 | 5 | ADD INDEX `versioned_end_translated_content` (`remove_transaction_id`, `value_tcid`, `value_id`), |
Index: trunk/extensions/Wikidata/Database scripts/Convenience/Create uw_meaning_relations indices.sql |
— | — | @@ -1,4 +1,4 @@ |
2 | | -ALTER TABLE `uw_meaning_relations` |
| 2 | +ALTER TABLE `%dc%_meaning_relations` |
3 | 3 | ADD INDEX `versioned_end_outgoing` (`remove_transaction_id`, `meaning1_mid`, `relationtype_mid`, `meaning2_mid`), |
4 | 4 | ADD INDEX `versioned_end_incoming` (`remove_transaction_id`, `meaning2_mid`, `relationtype_mid`, `meaning1_mid`), |
5 | 5 | ADD INDEX `versioned_end_relation` (`remove_transaction_id`, `relation_id`), |
Index: trunk/extensions/Wikidata/Database scripts/Convenience/Create uw_expression_ns indices.sql |
— | — | @@ -1,4 +1,4 @@ |
2 | | -ALTER TABLE `uw_expression_ns` |
| 2 | +ALTER TABLE `%dc%_expression_ns` |
3 | 3 | ADD INDEX `versioned_end_expression` (`remove_transaction_id`, `expression_id`, `language_id`), |
4 | 4 | ADD INDEX `versioned_end_language` (`remove_transaction_id`, `language_id`, `expression_id`), |
5 | 5 | ADD INDEX `versioned_end_spelling` (`remove_transaction_id`, `spelling` (255), `expression_id`, `language_id`), |
Index: trunk/extensions/Wikidata/Database scripts/Convenience/Recreate indexes for all tables.php |
— | — | @@ -10,8 +10,8 @@ |
11 | 11 | |
12 | 12 | ob_end_flush(); |
13 | 13 | |
14 | | -function createIndexesForTable($tableName) { |
15 | | - $handle = fopen("Create " . $tableName . " indices.sql", "r"); |
| 14 | +function createIndexesForTable($dc,$tableName) { |
| 15 | + $handle = fopen("Create uw_" . $tableName . " indices.sql", "r"); |
16 | 16 | $sql = ""; |
17 | 17 | |
18 | 18 | while (!feof($handle)) { |
— | — | @@ -21,22 +21,25 @@ |
22 | 22 | $sql .= $line; |
23 | 23 | } |
24 | 24 | |
| 25 | + $sql = str_replace("%dc%", $dc, $sql); |
| 26 | + |
25 | 27 | $dbr =& wfGetDB(DB_MASTER); |
26 | 28 | $queryResult = $dbr->query($sql); |
27 | 29 | |
28 | 30 | fclose($handle); |
29 | 31 | } |
30 | 32 | |
31 | | -function recreateIndexesForTable($tableName) { |
32 | | - echo "Dropping indices from table $tableName.\n"; |
33 | | - dropAllIndicesFromTable($tableName); |
34 | | - echo "Creating new indices for table $tableName.\n"; |
35 | | - createIndexesForTable($tableName); |
| 33 | +function recreateIndexesForTable($dc, $tableName) { |
| 34 | + echo "Dropping indices from table " . $dc . "_" . $tableName . ".\n"; |
| 35 | + dropAllIndicesFromTable($dc . "_" . $tableName); |
| 36 | + echo "Creating new indices for table " . $dc . "_" . $tableName . ".\n"; |
| 37 | + createIndexesForTable($dc,$tableName); |
36 | 38 | } |
37 | 39 | |
38 | | -function recreateIndexesForTables($tableNames) { |
39 | | - foreach ($tableNames as $tableName) |
40 | | - recreateIndexesForTable($tableName); |
| 40 | +function recreateIndexesForTables($dc, $tableNames) { |
| 41 | + foreach ($tableNames as $tableName){ |
| 42 | + recreateIndexesForTable($dc,$tableName); |
| 43 | + } |
41 | 44 | } |
42 | 45 | |
43 | 46 | global |
— | — | @@ -44,26 +47,27 @@ |
45 | 48 | |
46 | 49 | $beginTime = time(); |
47 | 50 | $wgCommandLineMode = true; |
| 51 | +$dc = "sp"; |
48 | 52 | |
49 | | -recreateIndexesForTables( |
| 53 | +recreateIndexesForTables( "sp", |
50 | 54 | array( |
51 | 55 | "bootstrapped_defined_meanings", |
52 | 56 | "transactions", |
53 | 57 | "translated_content", |
54 | | - "uw_alt_meaningtexts", |
55 | | - "uw_class_attributes", |
56 | | - "uw_class_membership", |
57 | | - "uw_collection_contents", |
58 | | - "uw_collection_ns", |
59 | | - "uw_defined_meaning", |
60 | | - "uw_expression_ns", |
61 | | - "uw_meaning_relations", |
62 | | - "uw_option_attribute_options", |
63 | | - "uw_option_attribute_values", |
64 | | - "uw_syntrans", |
65 | | - "uw_text_attribute_values", |
66 | | - "uw_translated_content_attribute_values", |
67 | | - "uw_url_attribute_values" |
| 58 | + "alt_meaningtexts", |
| 59 | + "class_attributes", |
| 60 | + "class_membership", |
| 61 | + "collection_contents", |
| 62 | + "collection_ns", |
| 63 | + "defined_meaning", |
| 64 | + "expression_ns", |
| 65 | + "meaning_relations", |
| 66 | + "option_attribute_options", |
| 67 | + "option_attribute_values", |
| 68 | + "syntrans", |
| 69 | + "text_attribute_values", |
| 70 | + "translated_content_attribute_values", |
| 71 | + "url_attribute_values" |
68 | 72 | ) |
69 | 73 | ); |
70 | 74 | |
Index: trunk/extensions/Wikidata/Database scripts/Convenience/wikidataCoreTables.sql |
— | — | @@ -7,12 +7,12 @@ |
8 | 8 | DELETE FROM namespace where ns_id = 24; |
9 | 9 | DELETE FROM namespace where ns_id = 25; |
10 | 10 | |
11 | | -INSERT INTO namespace (ns_id,ns_system,ns_subpages,ns_search_default,ns_target,ns_parent,ns_hidden,ns_class,ns_count) VALUES |
12 | | - (16,NULL,0,0,'',NULL,0,'OmegaWiki',1), |
13 | | - (17,NULL,1,0,'',16,0,NULL,NULL), |
14 | | - (24,NULL,0,0,'',NULL,0,'DefinedMeaning',1), |
15 | | - (25,NULL,1,0,'',24,0,NULL,NULL); |
16 | | - |
| 11 | +INSERT INTO `namespace` (`ns_id`,`ns_system`,`ns_parent`, `ns_count`, `ns_class` ) VALUES |
| 12 | + (16,'NS_EXPRESSION', NULL,0,NULL), |
| 13 | + (17,'NS_EXPRESSION_TALK', 16, 0,NULL), |
| 14 | + (24,'NS_DEFINEDMEANING', NULL,0,NULL), |
| 15 | + (25,'NS_DEFINEDMEANING_TALK',24, 0,NULL); |
| 16 | + |
17 | 17 | DELETE FROM namespace_names where ns_id = 16; |
18 | 18 | DELETE FROM namespace_names where ns_id = 17; |
19 | 19 | DELETE FROM namespace_names where ns_id = 24; |
— | — | @@ -33,7 +33,7 @@ |
34 | 34 | iso639_3 varchar(10) collate utf8_bin NOT NULL default '', |
35 | 35 | wikimedia_key varchar(10) collate utf8_bin NOT NULL default '', |
36 | 36 | PRIMARY KEY (language_id) |
37 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
| 37 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
38 | 38 | |
39 | 39 | INSERT INTO language (language_id,dialect_of_lid,iso639_2,iso639_3,wikimedia_key) VALUES |
40 | 40 | (84,0,'','','bg'), |
— | — | @@ -68,7 +68,7 @@ |
69 | 69 | language_name varchar(255) NOT NULL default '', |
70 | 70 | PRIMARY KEY (language_id,name_language_id), |
71 | 71 | KEY language_id (language_id) |
72 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 72 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
73 | 73 | |
74 | 74 | INSERT INTO language_names (language_id,name_language_id,language_name) VALUES |
75 | 75 | (84,85,'Bulgarian'), |
— | — | @@ -124,7 +124,7 @@ |
125 | 125 | set_prefix varchar(20) default NULL, |
126 | 126 | set_fallback_name varchar(255) default NULL, |
127 | 127 | set_dmid int(10) default NULL |
128 | | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 128 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
129 | 129 | |
130 | 130 | INSERT INTO wikidata_sets (set_prefix,set_fallback_name,set_dmid) VALUES |
131 | 131 | ('uw','OmegaWiki community',0), |
Index: trunk/extensions/Wikidata/Database scripts/Convenience/Create uw_url_attribute_values indices.sql |
— | — | @@ -1,4 +1,4 @@ |
2 | | -ALTER TABLE `uw_url_attribute_values` |
| 2 | +ALTER TABLE `%dc%_url_attribute_values` |
3 | 3 | ADD INDEX `versioned_end_object` (`remove_transaction_id`, `object_id`, `attribute_mid`, `value_id`), |
4 | 4 | ADD INDEX `versioned_end_attribute` (`remove_transaction_id`, `attribute_mid`, `object_id`, `value_id`), |
5 | 5 | ADD INDEX `versioned_end_value` (`remove_transaction_id`, `value_id`), |
Index: trunk/extensions/Wikidata/Database scripts/Convenience/Create uw_alt_meaningtexts indices.sql |
— | — | @@ -1,4 +1,4 @@ |
2 | | -ALTER TABLE `uw_alt_meaningtexts` |
| 2 | +ALTER TABLE `%dc%_alt_meaningtexts` |
3 | 3 | ADD INDEX `versioned_end_meaning` (`remove_transaction_id`, `meaning_mid`, `meaning_text_tcid`, `source_id`), |
4 | 4 | ADD INDEX `versioned_end_text` (`remove_transaction_id`, `meaning_text_tcid`, `meaning_mid`, `source_id`), |
5 | 5 | ADD INDEX `versioned_end_source` (`remove_transaction_id`, `source_id`, `meaning_mid`, `meaning_text_tcid`), |
Index: trunk/extensions/Wikidata/Database scripts/Convenience/Create uw_option_attribute_options indices.sql |
— | — | @@ -1,4 +1,4 @@ |
2 | | -ALTER TABLE `uw_option_attribute_options` |
| 2 | +ALTER TABLE `%dc%_option_attribute_options` |
3 | 3 | ADD INDEX `versioned_end_option` (`remove_transaction_id`, `option_mid`, `attribute_id`, `option_id`), |
4 | 4 | ADD INDEX `versioned_end_attribute` (`remove_transaction_id`, `attribute_id`, `option_id`, `option_mid`), |
5 | 5 | ADD INDEX `versioned_end_id` (`remove_transaction_id`, `option_id`), |