Index: trunk/phase3/maintenance/ibm_db2/tables.sql |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | user_email_token_expires TIMESTAMP(3), |
23 | 23 | user_email_authenticated TIMESTAMP(3), |
24 | 24 | -- obsolete, replace by user_properties table |
25 | | - user_options CLOB(64K) INLINE LENGTH 4096, |
| 25 | + -- user_options CLOB(64K) INLINE LENGTH 4096, |
26 | 26 | user_touched TIMESTAMP(3), |
27 | 27 | user_registration TIMESTAMP(3), |
28 | 28 | user_editcount INTEGER |
— | — | @@ -33,14 +33,16 @@ |
34 | 34 | INCLUDE (user_name, user_real_name, user_password, user_newpassword, user_newpass_time, user_token, |
35 | 35 | user_email, user_email_token, user_email_token_expires, user_email_authenticated, |
36 | 36 | user_touched, user_registration, user_editcount); |
| 37 | + |
| 38 | +CREATE UNIQUE INDEX user_email ON user (user_email); |
37 | 39 | |
38 | 40 | -- Create a dummy user to satisfy fk contraints especially with revisions |
39 | 41 | INSERT INTO user( |
40 | 42 | user_name, user_real_name, user_password, user_newpassword, user_newpass_time, |
41 | | -user_email, user_email_authenticated, user_options, user_token, user_registration, user_editcount) |
| 43 | +user_email, user_email_authenticated, user_token, user_registration, user_editcount) |
42 | 44 | VALUES ( |
43 | 45 | 'Anonymous','', NULL, NULL, CURRENT_TIMESTAMP, |
44 | | -NULL, NULL, NULL, NULL, CURRENT_timestamp, 0); |
| 46 | +NULL, NULL, NULL, CURRENT_timestamp, 0); |
45 | 47 | |
46 | 48 | |
47 | 49 | CREATE TABLE user_groups ( |
— | — | @@ -105,7 +107,8 @@ |
106 | 108 | rev_minor_edit SMALLINT NOT NULL DEFAULT 0, |
107 | 109 | rev_deleted SMALLINT NOT NULL DEFAULT 0, |
108 | 110 | rev_len BIGINT, |
109 | | - rev_parent_id BIGINT DEFAULT NULL |
| 111 | + rev_parent_id BIGINT DEFAULT NULL, |
| 112 | + rev_sha1 VARCHAR(255) NOT NULL DEFAULT '' |
110 | 113 | ); |
111 | 114 | CREATE UNIQUE INDEX revision_unique ON revision (rev_page, rev_id); |
112 | 115 | CREATE INDEX rev_text_id_idx ON revision (rev_text_id); |
— | — | @@ -171,7 +174,8 @@ |
172 | 175 | ar_deleted SMALLINT NOT NULL DEFAULT 0, |
173 | 176 | ar_len INTEGER, |
174 | 177 | ar_page_id INTEGER, |
175 | | - ar_parent_id INTEGER |
| 178 | + ar_parent_id INTEGER, |
| 179 | + ar_sha1 VARCHAR(255) NOT NULL DEFAULT '' |
176 | 180 | ); |
177 | 181 | CREATE INDEX archive_name_title_timestamp ON archive (ar_namespace,ar_title,ar_timestamp); |
178 | 182 | CREATE INDEX archive_user_text ON archive (ar_user_text); |
— | — | @@ -522,7 +526,31 @@ |
523 | 527 | CREATE INDEX log_user_type_time ON logging (log_user, log_type, log_timestamp); |
524 | 528 | CREATE INDEX log_page_id_time ON logging (log_page,log_timestamp); |
525 | 529 | |
| 530 | +CREATE UNIQUE INDEX "TYPE_ACTION" ON "LOGGING" |
| 531 | +( |
| 532 | +"LOG_TYPE", |
| 533 | +"LOG_ACTION", |
| 534 | +"LOG_TIMESTAMP" |
| 535 | +) |
| 536 | +; |
526 | 537 | |
| 538 | + |
| 539 | + |
| 540 | +CREATE TABLE trackbacks ( |
| 541 | + tb_id INTEGER NOT NULL PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY (START WITH 1), |
| 542 | + --PRIMARY KEY DEFAULT nextval('trackbacks_tb_id_seq'), |
| 543 | + -- foreign key also in MySQL |
| 544 | + tb_page INTEGER, |
| 545 | + -- REFERENCES page(page_id) ON DELETE CASCADE, |
| 546 | + tb_title VARCHAR(255) NOT NULL, |
| 547 | + tb_url CLOB(64K) INLINE LENGTH 4096 NOT NULL, |
| 548 | + tb_ex CLOB(64K) INLINE LENGTH 4096, |
| 549 | + tb_name VARCHAR(255) |
| 550 | +); |
| 551 | +CREATE INDEX trackback_page ON trackbacks (tb_page); |
| 552 | + |
| 553 | + |
| 554 | + |
527 | 555 | CREATE TABLE job ( |
528 | 556 | job_id BIGINT NOT NULL PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY (START WITH 1), |
529 | 557 | --PRIMARY KEY DEFAULT nextval('job_job_id_seq'), |
— | — | @@ -637,7 +665,7 @@ |
638 | 666 | up_user BIGINT NOT NULL, |
639 | 667 | |
640 | 668 | -- Name of the option being saved. This is indexed for bulk lookup. |
641 | | - up_property VARCHAR(32) FOR BIT DATA NOT NULL, |
| 669 | + up_property VARCHAR(255) FOR BIT DATA NOT NULL, |
642 | 670 | |
643 | 671 | -- Property value as a string. |
644 | 672 | up_value CLOB(64K) INLINE LENGTH 4096 |
— | — | @@ -722,3 +750,75 @@ |
723 | 751 | "IWL_TITLE" VARCHAR(255) FOR BIT DATA NOT NULL |
724 | 752 | ) |
725 | 753 | ; |
| 754 | + |
| 755 | + |
| 756 | +-- |
| 757 | +-- Store information about newly uploaded files before they're |
| 758 | +-- moved into the actual filestore |
| 759 | +-- |
| 760 | +CREATE TABLE /*_*/uploadstash ( |
| 761 | + us_id BIGINT NOT NULL GENERATED ALWAYS AS IDENTITY PRIMARY KEY, |
| 762 | + |
| 763 | + -- the user who uploaded the file. |
| 764 | + us_user BIGINT NOT NULL, |
| 765 | + |
| 766 | + -- file key. this is how applications actually search for the file. |
| 767 | + -- this might go away, or become the primary key. |
| 768 | + us_key varchar(255) NOT NULL, |
| 769 | + |
| 770 | + -- the original path |
| 771 | + us_orig_path varchar(255) NOT NULL, |
| 772 | + |
| 773 | + -- the temporary path at which the file is actually stored |
| 774 | + us_path varchar(255) NOT NULL, |
| 775 | + |
| 776 | + -- which type of upload the file came from (sometimes) |
| 777 | + us_source_type varchar(50), |
| 778 | + |
| 779 | + -- the date/time on which the file was added |
| 780 | + us_timestamp TIMESTAMP(3) not null, |
| 781 | + |
| 782 | + us_status varchar(50) not null, |
| 783 | + |
| 784 | + -- file properties from File::getPropsFromPath. these may prove unnecessary. |
| 785 | + -- |
| 786 | + us_size BIGINT NOT NULL, |
| 787 | + -- this hash comes from File::sha1Base36(), and is 31 characters |
| 788 | + us_sha1 varchar(31) NOT NULL, |
| 789 | + us_mime varchar(255), |
| 790 | + -- Media type as defined by the MEDIATYPE_xxx constants, should duplicate definition in the image table |
| 791 | + us_media_type VARCHAR(30) CONSTRAINT my_constraint CHECK (us_media_type in ('UNKNOWN', 'BITMAP', 'DRAWING', 'AUDIO', 'VIDEO', 'MULTIMEDIA', 'OFFICE', 'TEXT', 'EXECUTABLE', 'ARCHIVE')) default NULL, |
| 792 | + -- image-specific properties |
| 793 | + us_image_width BIGINT, |
| 794 | + us_image_height BIGINT, |
| 795 | + us_image_bits integer |
| 796 | + |
| 797 | +) /*$wgDBTableOptions*/; |
| 798 | + |
| 799 | +-- sometimes there's a delete for all of a user's stuff. |
| 800 | +CREATE INDEX /*i*/us_user ON /*_*/uploadstash (us_user); |
| 801 | +-- pick out files by key, enforce key uniqueness |
| 802 | +CREATE UNIQUE INDEX /*i*/us_key ON /*_*/uploadstash (us_key); |
| 803 | +-- the abandoned upload cleanup script needs this |
| 804 | +CREATE INDEX /*i*/us_timestamp ON /*_*/uploadstash (us_timestamp); |
| 805 | + |
| 806 | + |
| 807 | + |
| 808 | +-- Stores the groups the user has once belonged to. |
| 809 | +-- The user may still belong these groups. Check user_groups. |
| 810 | + |
| 811 | +CREATE TABLE user_former_groups ( |
| 812 | + ufg_user BIGINT NOT NULL DEFAULT 0, |
| 813 | + ufg_group VARCHAR(16) FOR BIT DATA NOT NULL |
| 814 | +); |
| 815 | +CREATE UNIQUE INDEX ufg_user_group ON user_former_groups (ufg_user, ufg_group); |
| 816 | + |
| 817 | + |
| 818 | +-- Table for holding configuration changes |
| 819 | +CREATE TABLE "CONFIG" |
| 820 | +( |
| 821 | +"CF_NAME" VARCHAR(255) NOT NULL PRIMARY KEY, |
| 822 | +"CF_VALUE" BLOB NOT NULL |
| 823 | +) |
| 824 | +; |
| 825 | + |
Index: trunk/phase3/includes/db/DatabaseIbm_db2.php |
— | — | @@ -104,6 +104,147 @@ |
105 | 105 | } |
106 | 106 | |
107 | 107 | /** |
| 108 | + * Wrapper to address lack of certain operations in the DB2 driver |
| 109 | + * ( seek, num_rows ) |
| 110 | + * @ingroup Database |
| 111 | + * @since 1.19 |
| 112 | + */ |
| 113 | +class IBM_DB2Result{ |
| 114 | + private $db; |
| 115 | + private $result; |
| 116 | + private $num_rows; |
| 117 | + private $current_pos; |
| 118 | + private $columns = array(); |
| 119 | + private $sql; |
| 120 | + |
| 121 | + private $resultSet = array(); |
| 122 | + private $loadedLines = 0; |
| 123 | + |
| 124 | + /** |
| 125 | + * Construct and initialize a wrapper for DB2 query results |
| 126 | + * @param $db Database |
| 127 | + * @param $result Object |
| 128 | + * @param $num_rows Integer |
| 129 | + * @param $sql String |
| 130 | + * @param $columns Array |
| 131 | + */ |
| 132 | + public function __construct( $db, $result, $num_rows, $sql, $columns ){ |
| 133 | + $this->db = $db; |
| 134 | + |
| 135 | + if( $result instanceof ResultWrapper ){ |
| 136 | + $this->result = $result->result; |
| 137 | + } |
| 138 | + else{ |
| 139 | + $this->result = $result; |
| 140 | + } |
| 141 | + |
| 142 | + $this->num_rows = $num_rows; |
| 143 | + $this->current_pos = 0; |
| 144 | + if ( $this->num_rows > 0 ) { |
| 145 | + // Make a lower-case list of the column names |
| 146 | + // By default, DB2 column names are capitalized |
| 147 | + // while MySQL column names are lowercase |
| 148 | + |
| 149 | + // Is there a reasonable maximum value for $i? |
| 150 | + // Setting to 2048 to prevent an infinite loop |
| 151 | + for( $i = 0; $i < 2048; $i++ ) { |
| 152 | + $name = db2_field_name( $this->result, $i ); |
| 153 | + if ( $name != false ) { |
| 154 | + continue; |
| 155 | + } |
| 156 | + else { |
| 157 | + return false; |
| 158 | + } |
| 159 | + |
| 160 | + $this->columns[$i] = strtolower( $name ); |
| 161 | + } |
| 162 | + } |
| 163 | + |
| 164 | + $this->sql = $sql; |
| 165 | + } |
| 166 | + |
| 167 | + /** |
| 168 | + * Unwrap the DB2 query results |
| 169 | + * @return mixed Object on success, false on failure |
| 170 | + */ |
| 171 | + public function getResult() { |
| 172 | + if ( $this->result ) { |
| 173 | + return $this->result; |
| 174 | + } |
| 175 | + else return false; |
| 176 | + } |
| 177 | + |
| 178 | + /** |
| 179 | + * Get the number of rows in the result set |
| 180 | + * @return integer |
| 181 | + */ |
| 182 | + public function getNum_rows() { |
| 183 | + return $this->num_rows; |
| 184 | + } |
| 185 | + |
| 186 | + /** |
| 187 | + * Return a row from the result set in object format |
| 188 | + * @return mixed Object on success, false on failure. |
| 189 | + */ |
| 190 | + public function fetchObject() { |
| 191 | + if ( $this->result |
| 192 | + && $this->num_rows > 0 |
| 193 | + && $this->current_pos >= 0 |
| 194 | + && $this->current_pos < $this->num_rows ) |
| 195 | + { |
| 196 | + $row = $this->fetchRow(); |
| 197 | + $ret = new stdClass(); |
| 198 | + |
| 199 | + foreach ( $row as $k => $v ) { |
| 200 | + $lc = $this->columns[$k]; |
| 201 | + $ret->$lc = $v; |
| 202 | + } |
| 203 | + return $ret; |
| 204 | + } |
| 205 | + return false; |
| 206 | + } |
| 207 | + |
| 208 | + /** |
| 209 | + * Return a row form the result set in array format |
| 210 | + * @return mixed Array on success, false on failure |
| 211 | + * @throws DBUnexpectedError |
| 212 | + */ |
| 213 | + public function fetchRow(){ |
| 214 | + if ( $this->result |
| 215 | + && $this->num_rows > 0 |
| 216 | + && $this->current_pos >= 0 |
| 217 | + && $this->current_pos < $this->num_rows ) |
| 218 | + { |
| 219 | + if ( $this->loadedLines <= $this->current_pos ) { |
| 220 | + $row = db2_fetch_array( $this->result ); |
| 221 | + $this->resultSet[$this->loadedLines++] = $row; |
| 222 | + if ( $this->db->lastErrno() ) { |
| 223 | + throw new DBUnexpectedError( $this->db, 'Error in fetchRow(): ' |
| 224 | + . htmlspecialchars( $this->db->lastError() ) ); |
| 225 | + } |
| 226 | + } |
| 227 | + |
| 228 | + if ( $this->loadedLines > $this->current_pos ){ |
| 229 | + return $this->resultSet[$this->current_pos++]; |
| 230 | + } |
| 231 | + |
| 232 | + } |
| 233 | + return false; |
| 234 | + } |
| 235 | + |
| 236 | + /** |
| 237 | + * Free a DB2 result object |
| 238 | + * @throws DBUnexpectedError |
| 239 | + */ |
| 240 | + public function freeResult(){ |
| 241 | + unset( $this->resultSet ); |
| 242 | + if ( !@db2_free_result( $this->result ) ) { |
| 243 | + throw new DBUnexpectedError( $this, "Unable to free DB2 result\n" ); |
| 244 | + } |
| 245 | + } |
| 246 | +} |
| 247 | + |
| 248 | +/** |
108 | 249 | * Primary database interface |
109 | 250 | * @ingroup Database |
110 | 251 | */ |
— | — | @@ -137,6 +278,8 @@ |
138 | 279 | protected $mAffectedRows = null; |
139 | 280 | /** Number of rows returned by last SELECT */ |
140 | 281 | protected $mNumRows = null; |
| 282 | + /** Current row number on the cursor of the last SELECT */ |
| 283 | + protected $currentRow = 0; |
141 | 284 | |
142 | 285 | /** Connection config options - see constructor */ |
143 | 286 | public $mConnOptions = array(); |
— | — | @@ -233,7 +376,7 @@ |
234 | 377 | /** |
235 | 378 | * Returns a unique string representing the wiki on the server |
236 | 379 | */ |
237 | | - function getWikiID() { |
| 380 | + public function getWikiID() { |
238 | 381 | if( $this->mSchema ) { |
239 | 382 | return "{$this->mDBname}-{$this->mSchema}"; |
240 | 383 | } else { |
— | — | @@ -241,10 +384,22 @@ |
242 | 385 | } |
243 | 386 | } |
244 | 387 | |
245 | | - function getType() { |
| 388 | + /** |
| 389 | + * Returns the database software identifieir |
| 390 | + * @return string |
| 391 | + */ |
| 392 | + public function getType() { |
246 | 393 | return 'ibm_db2'; |
247 | 394 | } |
248 | 395 | |
| 396 | + /** |
| 397 | + * Returns the database connection object |
| 398 | + * @return Object |
| 399 | + */ |
| 400 | + public function getDb(){ |
| 401 | + return $this->mConn; |
| 402 | + } |
| 403 | + |
249 | 404 | /** |
250 | 405 | * |
251 | 406 | * @param $server String: hostname of database server |
— | — | @@ -268,17 +423,12 @@ |
269 | 424 | } |
270 | 425 | |
271 | 426 | // configure the connection and statement objects |
272 | | - /* |
273 | | - $this->setDB2Option( 'cursor', 'DB2_SCROLLABLE', |
274 | | - self::CONN_OPTION | self::STMT_OPTION ); |
275 | | - */ |
276 | 427 | $this->setDB2Option( 'db2_attr_case', 'DB2_CASE_LOWER', |
277 | 428 | self::CONN_OPTION | self::STMT_OPTION ); |
278 | 429 | $this->setDB2Option( 'deferred_prepare', 'DB2_DEFERRED_PREPARE_ON', |
279 | 430 | self::STMT_OPTION ); |
280 | 431 | $this->setDB2Option( 'rowcount', 'DB2_ROWCOUNT_PREFETCH_ON', |
281 | 432 | self::STMT_OPTION ); |
282 | | - |
283 | 433 | parent::__construct( $server, $user, $password, $dbName, DBO_TRX | $flags ); |
284 | 434 | } |
285 | 435 | |
— | — | @@ -361,8 +511,6 @@ |
362 | 512 | throw new DBConnectionError( $this, $this->lastError() ); |
363 | 513 | } |
364 | 514 | |
365 | | - // Apply connection config |
366 | | - db2_set_option( $this->mConn, $this->mConnOptions, 1 ); |
367 | 515 | // Some MediaWiki code is still transaction-less (?). |
368 | 516 | // The strategy is to keep AutoCommit on for that code |
369 | 517 | // but switch it off whenever a transaction is begun. |
— | — | @@ -391,7 +539,7 @@ |
392 | 540 | { |
393 | 541 | $dsn = "DRIVER={IBM DB2 ODBC DRIVER};DATABASE=$dbName;CHARSET=UTF-8;HOSTNAME=$server;PORT=$port;PROTOCOL=TCPIP;UID=$user;PWD=$password;"; |
394 | 542 | wfSuppressWarnings(); |
395 | | - $this->mConn = db2_pconnect($dsn, "", "", array()); |
| 543 | + $this->mConn = db2_pconnect( $dsn, "", "", array() ); |
396 | 544 | wfRestoreWarnings(); |
397 | 545 | } |
398 | 546 | |
— | — | @@ -464,7 +612,7 @@ |
465 | 613 | // Needed to handle any UTF-8 encoding issues in the raw sql |
466 | 614 | // Note that we fully support prepared statements for DB2 |
467 | 615 | // prepare() and execute() should be used instead of doQuery() whenever possible |
468 | | - $sql = utf8_decode($sql); |
| 616 | + $sql = utf8_decode( $sql ); |
469 | 617 | |
470 | 618 | $ret = db2_exec( $this->mConn, $sql, $this->mStmtOptions ); |
471 | 619 | if( $ret == false ) { |
— | — | @@ -1062,9 +1210,13 @@ |
1063 | 1211 | */ |
1064 | 1212 | public function dataSeek( $res, $row ) { |
1065 | 1213 | if ( $res instanceof ResultWrapper ) { |
1066 | | - $res = $res->result; |
| 1214 | + return $res = $res->result; |
1067 | 1215 | } |
1068 | | - return db2_fetch_row( $res, $row ); |
| 1216 | + if ( $res instanceof IBM_DB2Result ) { |
| 1217 | + return $res->dataSeek( $row ); |
| 1218 | + } |
| 1219 | + wfDebug( "dataSeek operation in DB2 database\n" ); |
| 1220 | + return false; |
1069 | 1221 | } |
1070 | 1222 | |
1071 | 1223 | ### |
— | — | @@ -1097,6 +1249,9 @@ |
1098 | 1250 | if ( $res instanceof ResultWrapper ) { |
1099 | 1251 | $res = $res->result; |
1100 | 1252 | } |
| 1253 | + if ( $res instanceof IBM_DB2Result ) { |
| 1254 | + $res = $res->getResult(); |
| 1255 | + } |
1101 | 1256 | return db2_num_fields( $res ); |
1102 | 1257 | } |
1103 | 1258 | |
— | — | @@ -1110,6 +1265,9 @@ |
1111 | 1266 | if ( $res instanceof ResultWrapper ) { |
1112 | 1267 | $res = $res->result; |
1113 | 1268 | } |
| 1269 | + if ( $res instanceof IBM_DB2Result ) { |
| 1270 | + $res = $res->getResult(); |
| 1271 | + } |
1114 | 1272 | return db2_field_name( $res, $n ); |
1115 | 1273 | } |
1116 | 1274 | |
— | — | @@ -1122,7 +1280,7 @@ |
1123 | 1281 | * @param $fname String: calling function name (use __METHOD__) |
1124 | 1282 | * for logs/profiling |
1125 | 1283 | * @param $options Associative array of options |
1126 | | - * (e.g. array('GROUP BY' => 'page_title')), |
| 1284 | + * (e.g. array( 'GROUP BY' => 'page_title' )), |
1127 | 1285 | * see Database::makeSelectOptions code for list of |
1128 | 1286 | * supported stuff |
1129 | 1287 | * @param $join_conds Associative array of table join conditions (optional) |
— | — | @@ -1135,6 +1293,7 @@ |
1136 | 1294 | { |
1137 | 1295 | $res = parent::select( $table, $vars, $conds, $fname, $options, |
1138 | 1296 | $join_conds ); |
| 1297 | + $sql = $this->selectSQLText( $table, $vars, $conds, $fname, $options, $join_conds ); |
1139 | 1298 | |
1140 | 1299 | // We must adjust for offset |
1141 | 1300 | if ( isset( $options['LIMIT'] ) && isset ( $options['OFFSET'] ) ) { |
— | — | @@ -1161,10 +1320,11 @@ |
1162 | 1321 | |
1163 | 1322 | $res2 = parent::select( $table, $vars2, $conds, $fname, $options2, |
1164 | 1323 | $join_conds ); |
| 1324 | + |
1165 | 1325 | $obj = $this->fetchObject( $res2 ); |
1166 | 1326 | $this->mNumRows = $obj->num_rows; |
1167 | | - |
1168 | | - return $res; |
| 1327 | + |
| 1328 | + return new ResultWrapper( $this, new IBM_DB2Result( $this, $res, $obj->num_rows, $vars, $sql ) ); |
1169 | 1329 | } |
1170 | 1330 | |
1171 | 1331 | /** |
— | — | @@ -1332,6 +1492,9 @@ |
1333 | 1493 | if ( $res instanceof ResultWrapper ) { |
1334 | 1494 | $res = $res->result; |
1335 | 1495 | } |
| 1496 | + if ( $res instanceof IBM_DB2Result ) { |
| 1497 | + $res = $res->getResult(); |
| 1498 | + } |
1336 | 1499 | return db2_field_type( $res, $index ); |
1337 | 1500 | } |
1338 | 1501 | |
Index: trunk/phase3/includes/installer/Ibm_db2Installer.php |
— | — | @@ -216,7 +216,7 @@ |
217 | 217 | $this->db->selectDB( $this->getVar( 'wgDBname' ) ); |
218 | 218 | |
219 | 219 | try { |
220 | | - $result = $this->db->query( 'SELECT PAGESIZE FROM SYSCAT.TABLESPACES' ); |
| 220 | + $result = $this->db->query( 'SELECT PAGESIZE FROM SYSCAT.TABLESPACES FOR READ ONLY' ); |
221 | 221 | if( $result == false ) { |
222 | 222 | $status->fatal( 'config-connection-error', '' ); |
223 | 223 | } else { |
— | — | @@ -249,7 +249,7 @@ |
250 | 250 | \$wgDBport = \"{$port}\";"; |
251 | 251 | } |
252 | 252 | |
253 | | - public function __construct($parent) { |
254 | | - parent::__construct($parent); |
| 253 | + public function __construct( $parent ) { |
| 254 | + parent::__construct( $parent ); |
255 | 255 | } |
256 | 256 | } |
Index: trunk/phase3/includes/installer/Ibm_db2Updater.php |
— | — | @@ -45,25 +45,31 @@ |
46 | 46 | array( 'addField', 'interwiki', 'iw_api', 'patch-iw_api_and_wikiid.sql' ), |
47 | 47 | array( 'addField', 'categorylinks', 'cl_collation', 'patch-categorylinks-better-collation.sql' ), |
48 | 48 | array( 'addTable', 'msg_resource', 'patch-msg_resource.sql' ), |
49 | | - array( 'addTable', 'module_deps', 'patch-module_deps.sql' ), |
50 | | - |
51 | | - // Tables |
52 | | - array( 'addTable', 'iwlinks', 'patch-iwlinks.sql' ), |
53 | 49 | array( 'addTable', 'msg_resource_links', 'patch-msg_resource_links.sql' ), |
54 | | - array( 'addTable', 'msg_resource', 'patch-msg_resource.sql' ), |
55 | | - array( 'addTable', 'module_deps', 'patch-module_deps.sql' ), |
56 | | - |
57 | | - // Indexes |
58 | 50 | array( 'addIndex', 'msg_resource_links', 'uq61_msg_resource_links', 'patch-uq_61_msg_resource_links.sql' ), |
59 | 51 | array( 'addIndex', 'msg_resource', 'uq81_msg_resource', 'patch-uq_81_msg_resource.sql' ), |
| 52 | + array( 'addTable', 'module_deps', 'patch-module_deps.sql' ), |
60 | 53 | array( 'addIndex', 'module_deps', 'uq96_module_deps', 'patch-uq_96_module_deps.sql' ), |
61 | | - |
62 | | - // Fields |
| 54 | + array( 'addField', 'interwiki', 'iw_api', 'patch-iw_api-field.sql' ), |
| 55 | + array( 'addField', 'interwiki', 'iw_wikiid', 'patch-iw_wikiid-field.sql' ) |
63 | 56 | array( 'addField', 'categorylinks', 'cl_sortkey_prefix', 'patch-cl_sortkey_prefix-field.sql' ), |
64 | 57 | array( 'addField', 'categorylinks', 'cl_collation', 'patch-cl_collation-field.sql' ), |
65 | 58 | array( 'addField', 'categorylinks', 'cl_type', 'patch-cl_type-field.sql' ), |
66 | | - array( 'addField', 'interwiki', 'iw_api', 'patch-iw_api-field.sql' ), |
67 | | - array( 'addField', 'interwiki', 'iw_wikiid', 'patch-iw_wikiid-field.sql' ) |
| 59 | + |
| 60 | + //1.18 |
| 61 | + array( 'doUserNewTalkTimestampNotNull' ), |
| 62 | + array( 'addIndex', 'user', 'user_email', 'patch-user_email_index.sql' ), |
| 63 | + array( 'modifyField', 'user_properties', 'up_property', 'patch-up_property.sql' ), |
| 64 | + array( 'addTable', 'uploadstash', 'patch-uploadstash.sql' ), |
| 65 | + array( 'addTable', 'user_former_groups', 'patch-user_former_groups.sql'), |
| 66 | + array( 'doRebuildLocalisationCache' ), |
| 67 | + |
| 68 | + // 1.19 |
| 69 | + array( 'addTable', 'config', 'patch-config.sql' ), |
| 70 | + array( 'addIndex', 'logging', 'type_action', 'patch-logging-type-action-index.sql'), |
| 71 | + array( 'dropField', 'user', 'user_options', 'patch-drop-user_options.sql' ), |
| 72 | + array( 'addField', 'revision', 'rev_sha1', 'patch-rev_sha1.sql' ), |
| 73 | + array( 'addField', 'archive', 'ar_sha1', 'patch-ar_sha1.sql' ) |
68 | 74 | ); |
69 | 75 | } |
70 | 76 | } |
\ No newline at end of file |