r85890 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85889‎ | r85890 | r85891 >
Date:17:07, 12 April 2011
Author:leonsp
Status:ok
Tags:
Comment:
Addressing comment by IAlex. Setting svn:eol-style to native and removing ?> from end of file.
Modified paths:
  • /trunk/phase3/includes/installer/Ibm_db2Installer.php (modified) (history)
  • /trunk/phase3/includes/installer/Ibm_db2Updater.php (modified) (history)
  • /trunk/phase3/maintenance/ibm_db2/patch-categorylinks-better-collation.sql (modified) (history)
  • /trunk/phase3/maintenance/ibm_db2/patch-change_tag-indexes.sql (modified) (history)
  • /trunk/phase3/maintenance/ibm_db2/patch-change_tag.sql (modified) (history)
  • /trunk/phase3/maintenance/ibm_db2/patch-change_tag_summary.sql (modified) (history)
  • /trunk/phase3/maintenance/ibm_db2/patch-change_valid_tag.sql (modified) (history)
  • /trunk/phase3/maintenance/ibm_db2/patch-cl_collation-field.sql (modified) (history)
  • /trunk/phase3/maintenance/ibm_db2/patch-cl_sortkey_prefix-field.sql (modified) (history)
  • /trunk/phase3/maintenance/ibm_db2/patch-cl_type-field.sql (modified) (history)
  • /trunk/phase3/maintenance/ibm_db2/patch-external_user.sql (modified) (history)
  • /trunk/phase3/maintenance/ibm_db2/patch-ipb_allow_usertalk.sql (modified) (history)
  • /trunk/phase3/maintenance/ibm_db2/patch-iw_api-field.sql (modified) (history)
  • /trunk/phase3/maintenance/ibm_db2/patch-iw_api_and_wikiid.sql (modified) (history)
  • /trunk/phase3/maintenance/ibm_db2/patch-iw_wikiid-field.sql (modified) (history)
  • /trunk/phase3/maintenance/ibm_db2/patch-iwlinks.sql (modified) (history)
  • /trunk/phase3/maintenance/ibm_db2/patch-l10n_cache.sql (modified) (history)
  • /trunk/phase3/maintenance/ibm_db2/patch-log_search-rename-index.sql (modified) (history)
  • /trunk/phase3/maintenance/ibm_db2/patch-log_search.sql (modified) (history)
  • /trunk/phase3/maintenance/ibm_db2/patch-log_user_text.sql (modified) (history)
  • /trunk/phase3/maintenance/ibm_db2/patch-module_deps.sql (modified) (history)
  • /trunk/phase3/maintenance/ibm_db2/patch-msg_resource.sql (modified) (history)
  • /trunk/phase3/maintenance/ibm_db2/patch-msg_resource_links.sql (modified) (history)
  • /trunk/phase3/maintenance/ibm_db2/patch-rd_interwiki.sql (modified) (history)
  • /trunk/phase3/maintenance/ibm_db2/patch-ss_active_users.sql (modified) (history)
  • /trunk/phase3/maintenance/ibm_db2/patch-ul_value.sql (modified) (history)
  • /trunk/phase3/maintenance/ibm_db2/patch-uq61_msg_resource_links.sql (modified) (history)
  • /trunk/phase3/maintenance/ibm_db2/patch-uq81_msg_resource.sql (modified) (history)
  • /trunk/phase3/maintenance/ibm_db2/patch-uq96_module_deps.sql (modified) (history)
  • /trunk/phase3/maintenance/ibm_db2/patch-user_properties.sql (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/Ibm_db2Installer.php
@@ -1,250 +1,249 @@
2 -<?php
3 -/**
4 - * IBM_DB2-specific installer.
5 - *
6 - * @file
7 - * @ingroup Deployment
8 - */
9 -
10 -/**
11 - * Class for setting up the MediaWiki database using IBM_DB2.
12 - *
13 - * @ingroup Deployment
14 - * @since 1.17
15 - */
16 -class Ibm_db2Installer extends DatabaseInstaller {
17 -
18 -
19 - protected $globalNames = array(
20 - 'wgDBserver',
21 - 'wgDBport',
22 - 'wgDBname',
23 - 'wgDBuser',
24 - 'wgDBpassword',
25 - 'wgDBmwschema',
26 - );
27 -
28 - /**
29 - * Get the DB2 database extension name
30 - * @return string
31 - */
32 - public function getName(){
33 - return 'ibm_db2';
34 - }
35 -
36 - /**
37 - * Determine whether the DB2 database extension is currently available in PHP
38 - * @return boolean
39 - */
40 - public function isCompiled() {
41 - return self::checkExtension( 'ibm_db2' );
42 - }
43 -
44 - /**
45 - * Generate a connection form for a DB2 database
46 - * @return string
47 - */
48 - public function getConnectForm() {
49 - return
50 - $this->getTextBox( 'wgDBserver', 'config-db-host', array(), $this->parent->getHelpBox( 'config-db-host-help' ) ) .
51 - $this->getTextBox( 'wgDBport', 'config-db-port', array(), $this->parent->getHelpBox( 'config-db-port' ) ) .
52 - Html::openElement( 'fieldset' ) .
53 - Html::element( 'legend', array(), wfMsg( 'config-db-wiki-settings' ) ) .
54 - $this->getTextBox( 'wgDBname', 'config-db-name', array(), $this->parent->getHelpBox( 'config-db-name-help' ) ) .
55 - $this->getTextBox( 'wgDBmwschema', 'config-db-schema', array(), $this->parent->getHelpBox( 'config-db-schema-help' ) ) .
56 - Html::closeElement( 'fieldset' ) .
57 - $this->getInstallUserBox();
58 - }
59 -
60 - /**
61 - * Validate and then execute the connection form for a DB2 database
62 - * @return Status
63 - */
64 - public function submitConnectForm() {
65 - // Get variables from the request
66 - $newValues = $this->setVarsFromRequest(
67 - array( 'wgDBserver', 'wgDBport', 'wgDBname',
68 - 'wgDBmwschema', 'wgDBuser', 'wgDBpassword' ) );
69 -
70 - // Validate them
71 - $status = Status::newGood();
72 - if ( !strlen( $newValues['wgDBname'] ) ) {
73 - $status->fatal( 'config-missing-db-name' );
74 - } elseif ( !preg_match( '/^[a-zA-Z0-9_]+$/', $newValues['wgDBname'] ) ) {
75 - $status->fatal( 'config-invalid-db-name', $newValues['wgDBname'] );
76 - }
77 - if ( !strlen( $newValues['wgDBmwschema'] ) ) {
78 - $status->fatal( 'config-invalid-schema' );
79 - }
80 - elseif ( !preg_match( '/^[a-zA-Z0-9_]*$/', $newValues['wgDBmwschema'] ) ) {
81 - $status->fatal( 'config-invalid-schema', $newValues['wgDBmwschema'] );
82 - }
83 - if ( !strlen( $newValues['wgDBport'] ) ) {
84 - $status->fatal( 'config-invalid-port' );
85 - }
86 - elseif ( !preg_match( '/^[0-9_]*$/', $newValues['wgDBport'] ) ) {
87 - $status->fatal( 'config-invalid-port', $newValues['wgDBport'] );
88 - }
89 -
90 - // Submit user box
91 - if ( $status->isOK() ) {
92 - $status->merge( $this->submitInstallUserBox() );
93 - }
94 - if ( !$status->isOK() ) {
95 - return $status;
96 - }
97 -
98 - global $wgDBport;
99 - $wgDBport = $newValues['wgDBport'];
100 -
101 - // Try to connect
102 - $status->merge( $this->getConnection() );
103 - if ( !$status->isOK() ) {
104 - return $status;
105 - }
106 -
107 - $this->parent->setVar( 'wgDBuser', $this->getVar( '_InstallUser' ) );
108 - $this->parent->setVar( 'wgDBpassword', $this->getVar( '_InstallPassword' ) );
109 -
110 - return $status;
111 -
112 - }
113 -
114 - /**
115 - * Open a DB2 database connection
116 - * @return Status
117 - */
118 - public function openConnection() {
119 - $status = Status::newGood();
120 - try {
121 - $db = new DatabaseIbm_db2(
122 - $this->getVar( 'wgDBserver' ),
123 - $this->getVar( '_InstallUser' ),
124 - $this->getVar( '_InstallPassword' ),
125 - $this->getVar( 'wgDBname' ),
126 - 0,
127 - $this->getVar( 'wgDBmwschema' )
128 - );
129 - $status->value = $db;
130 - } catch ( DBConnectionError $e ) {
131 - $status->fatal( 'config-connection-error', $e->getMessage() );
132 - }
133 - return $status;
134 - }
135 -
136 - /**
137 - * Create a DB2 database for MediaWiki
138 - * @return Status
139 - */
140 - public function setupDatabase() {
141 - $status = $this->getConnection();
142 - if ( !$status->isOK() ) {
143 - return $status;
144 - }
145 - $conn = $status->value;
146 - $dbName = $this->getVar( 'wgDBname' );
147 - if( !$conn->selectDB( $dbName ) ) {
148 - $conn->query( "CREATE DATABASE "
149 - . $conn->addIdentifierQuotes( $dbName )
150 - . " AUTOMATIC STORAGE YES"
151 - . " USING CODESET UTF-8 TERRITORY US COLLATE USING SYSTEM"
152 - . " PAGESIZE 32768", __METHOD__ );
153 - $conn->selectDB( $dbName );
154 - }
155 - $this->setupSchemaVars();
156 - return $status;
157 - }
158 -
159 - /**
160 - * Create tables from scratch.
161 - * First check if pagesize >= 32k.
162 - *
163 - * @return Status
164 - */
165 - public function createTables() {
166 - $status = $this->getConnection();
167 - if ( !$status->isOK() ) {
168 - return $status;
169 - }
170 - $this->db->selectDB( $this->getVar( 'wgDBname' ) );
171 -
172 - if( $this->db->tableExists( 'user' ) ) {
173 - $status->warning( 'config-install-tables-exist' );
174 - return $status;
175 - }
176 -
177 - /* Check for pagesize */
178 - $status = $this->checkPageSize();
179 - if ( !$status->isOK() ) {
180 - return $status;
181 - }
182 -
183 - $this->db->setFlag( DBO_DDLMODE ); // For Oracle's handling of schema files
184 - $this->db->begin( __METHOD__ );
185 -
186 - $error = $this->db->sourceFile( $this->db->getSchema() );
187 - if( $error !== true ) {
188 - $this->db->reportQueryError( $error, 0, '', __METHOD__ );
189 - $this->db->rollback( __METHOD__ );
190 - $status->fatal( 'config-install-tables-failed', $error );
191 - } else {
192 - $this->db->commit( __METHOD__ );
193 - }
194 - // Resume normal operations
195 - if( $status->isOk() ) {
196 - $this->enableLB();
197 - }
198 - return $status;
199 - }
200 -
201 - /**
202 - * Check if database has a tablspace with pagesize >= 32k.
203 - *
204 - * @return Status
205 - */
206 - public function checkPageSize() {
207 - $status = $this->getConnection();
208 - if ( !$status->isOK() ) {
209 - return $status;
210 - }
211 - $this->db->selectDB( $this->getVar( 'wgDBname' ) );
212 -
213 - try {
214 - $result = $this->db->query( 'SELECT PAGESIZE FROM SYSCAT.TABLESPACES' );
215 - if( $result == false ) {
216 - $status->fatal( 'config-connection-error', '' );
217 - }
218 - else {
219 - $nRows = $this->db->numRows( $result );
220 - while ( $row = $row = $this->db->fetchRow( $result ) ) {
221 - if( $row[0] >= 32768 ) {
222 - return $status;
223 - }
224 - }
225 - $status->fatal( 'config-ibm_db2-low-db-pagesize', '' );
226 - }
227 - } catch ( DBUnexpectedError $e ) {
228 - $status->fatal( 'config-connection-error', $e->getMessage() );
229 - }
230 -
231 - return $status;
232 - }
233 -
234 - /**
235 - * Generate the code to store the DB2-specific settings defined by the configuration form
236 - * @return string
237 - */
238 - public function getLocalSettings() {
239 - $schema = LocalSettingsGenerator::escapePhpString( $this->getVar( 'wgDBmwschema' ) );
240 - $port = LocalSettingsGenerator::escapePhpString( $this->getVar( 'wgDBport' ) );
241 - return
242 -"# IBM_DB2 specific settings
243 -\$wgDBmwschema = \"{$schema}\";
244 -\$wgDBport = \"{$port}\";";
245 - }
246 -
247 - public function __construct($parent) {
248 - parent::__construct($parent);
249 - }
250 -}
251 -?>
 2+<?php
 3+/**
 4+ * IBM_DB2-specific installer.
 5+ *
 6+ * @file
 7+ * @ingroup Deployment
 8+ */
 9+
 10+/**
 11+ * Class for setting up the MediaWiki database using IBM_DB2.
 12+ *
 13+ * @ingroup Deployment
 14+ * @since 1.17
 15+ */
 16+class Ibm_db2Installer extends DatabaseInstaller {
 17+
 18+
 19+ protected $globalNames = array(
 20+ 'wgDBserver',
 21+ 'wgDBport',
 22+ 'wgDBname',
 23+ 'wgDBuser',
 24+ 'wgDBpassword',
 25+ 'wgDBmwschema',
 26+ );
 27+
 28+ /**
 29+ * Get the DB2 database extension name
 30+ * @return string
 31+ */
 32+ public function getName(){
 33+ return 'ibm_db2';
 34+ }
 35+
 36+ /**
 37+ * Determine whether the DB2 database extension is currently available in PHP
 38+ * @return boolean
 39+ */
 40+ public function isCompiled() {
 41+ return self::checkExtension( 'ibm_db2' );
 42+ }
 43+
 44+ /**
 45+ * Generate a connection form for a DB2 database
 46+ * @return string
 47+ */
 48+ public function getConnectForm() {
 49+ return
 50+ $this->getTextBox( 'wgDBserver', 'config-db-host', array(), $this->parent->getHelpBox( 'config-db-host-help' ) ) .
 51+ $this->getTextBox( 'wgDBport', 'config-db-port', array(), $this->parent->getHelpBox( 'config-db-port' ) ) .
 52+ Html::openElement( 'fieldset' ) .
 53+ Html::element( 'legend', array(), wfMsg( 'config-db-wiki-settings' ) ) .
 54+ $this->getTextBox( 'wgDBname', 'config-db-name', array(), $this->parent->getHelpBox( 'config-db-name-help' ) ) .
 55+ $this->getTextBox( 'wgDBmwschema', 'config-db-schema', array(), $this->parent->getHelpBox( 'config-db-schema-help' ) ) .
 56+ Html::closeElement( 'fieldset' ) .
 57+ $this->getInstallUserBox();
 58+ }
 59+
 60+ /**
 61+ * Validate and then execute the connection form for a DB2 database
 62+ * @return Status
 63+ */
 64+ public function submitConnectForm() {
 65+ // Get variables from the request
 66+ $newValues = $this->setVarsFromRequest(
 67+ array( 'wgDBserver', 'wgDBport', 'wgDBname',
 68+ 'wgDBmwschema', 'wgDBuser', 'wgDBpassword' ) );
 69+
 70+ // Validate them
 71+ $status = Status::newGood();
 72+ if ( !strlen( $newValues['wgDBname'] ) ) {
 73+ $status->fatal( 'config-missing-db-name' );
 74+ } elseif ( !preg_match( '/^[a-zA-Z0-9_]+$/', $newValues['wgDBname'] ) ) {
 75+ $status->fatal( 'config-invalid-db-name', $newValues['wgDBname'] );
 76+ }
 77+ if ( !strlen( $newValues['wgDBmwschema'] ) ) {
 78+ $status->fatal( 'config-invalid-schema' );
 79+ }
 80+ elseif ( !preg_match( '/^[a-zA-Z0-9_]*$/', $newValues['wgDBmwschema'] ) ) {
 81+ $status->fatal( 'config-invalid-schema', $newValues['wgDBmwschema'] );
 82+ }
 83+ if ( !strlen( $newValues['wgDBport'] ) ) {
 84+ $status->fatal( 'config-invalid-port' );
 85+ }
 86+ elseif ( !preg_match( '/^[0-9_]*$/', $newValues['wgDBport'] ) ) {
 87+ $status->fatal( 'config-invalid-port', $newValues['wgDBport'] );
 88+ }
 89+
 90+ // Submit user box
 91+ if ( $status->isOK() ) {
 92+ $status->merge( $this->submitInstallUserBox() );
 93+ }
 94+ if ( !$status->isOK() ) {
 95+ return $status;
 96+ }
 97+
 98+ global $wgDBport;
 99+ $wgDBport = $newValues['wgDBport'];
 100+
 101+ // Try to connect
 102+ $status->merge( $this->getConnection() );
 103+ if ( !$status->isOK() ) {
 104+ return $status;
 105+ }
 106+
 107+ $this->parent->setVar( 'wgDBuser', $this->getVar( '_InstallUser' ) );
 108+ $this->parent->setVar( 'wgDBpassword', $this->getVar( '_InstallPassword' ) );
 109+
 110+ return $status;
 111+
 112+ }
 113+
 114+ /**
 115+ * Open a DB2 database connection
 116+ * @return Status
 117+ */
 118+ public function openConnection() {
 119+ $status = Status::newGood();
 120+ try {
 121+ $db = new DatabaseIbm_db2(
 122+ $this->getVar( 'wgDBserver' ),
 123+ $this->getVar( '_InstallUser' ),
 124+ $this->getVar( '_InstallPassword' ),
 125+ $this->getVar( 'wgDBname' ),
 126+ 0,
 127+ $this->getVar( 'wgDBmwschema' )
 128+ );
 129+ $status->value = $db;
 130+ } catch ( DBConnectionError $e ) {
 131+ $status->fatal( 'config-connection-error', $e->getMessage() );
 132+ }
 133+ return $status;
 134+ }
 135+
 136+ /**
 137+ * Create a DB2 database for MediaWiki
 138+ * @return Status
 139+ */
 140+ public function setupDatabase() {
 141+ $status = $this->getConnection();
 142+ if ( !$status->isOK() ) {
 143+ return $status;
 144+ }
 145+ $conn = $status->value;
 146+ $dbName = $this->getVar( 'wgDBname' );
 147+ if( !$conn->selectDB( $dbName ) ) {
 148+ $conn->query( "CREATE DATABASE "
 149+ . $conn->addIdentifierQuotes( $dbName )
 150+ . " AUTOMATIC STORAGE YES"
 151+ . " USING CODESET UTF-8 TERRITORY US COLLATE USING SYSTEM"
 152+ . " PAGESIZE 32768", __METHOD__ );
 153+ $conn->selectDB( $dbName );
 154+ }
 155+ $this->setupSchemaVars();
 156+ return $status;
 157+ }
 158+
 159+ /**
 160+ * Create tables from scratch.
 161+ * First check if pagesize >= 32k.
 162+ *
 163+ * @return Status
 164+ */
 165+ public function createTables() {
 166+ $status = $this->getConnection();
 167+ if ( !$status->isOK() ) {
 168+ return $status;
 169+ }
 170+ $this->db->selectDB( $this->getVar( 'wgDBname' ) );
 171+
 172+ if( $this->db->tableExists( 'user' ) ) {
 173+ $status->warning( 'config-install-tables-exist' );
 174+ return $status;
 175+ }
 176+
 177+ /* Check for pagesize */
 178+ $status = $this->checkPageSize();
 179+ if ( !$status->isOK() ) {
 180+ return $status;
 181+ }
 182+
 183+ $this->db->setFlag( DBO_DDLMODE ); // For Oracle's handling of schema files
 184+ $this->db->begin( __METHOD__ );
 185+
 186+ $error = $this->db->sourceFile( $this->db->getSchema() );
 187+ if( $error !== true ) {
 188+ $this->db->reportQueryError( $error, 0, '', __METHOD__ );
 189+ $this->db->rollback( __METHOD__ );
 190+ $status->fatal( 'config-install-tables-failed', $error );
 191+ } else {
 192+ $this->db->commit( __METHOD__ );
 193+ }
 194+ // Resume normal operations
 195+ if( $status->isOk() ) {
 196+ $this->enableLB();
 197+ }
 198+ return $status;
 199+ }
 200+
 201+ /**
 202+ * Check if database has a tablspace with pagesize >= 32k.
 203+ *
 204+ * @return Status
 205+ */
 206+ public function checkPageSize() {
 207+ $status = $this->getConnection();
 208+ if ( !$status->isOK() ) {
 209+ return $status;
 210+ }
 211+ $this->db->selectDB( $this->getVar( 'wgDBname' ) );
 212+
 213+ try {
 214+ $result = $this->db->query( 'SELECT PAGESIZE FROM SYSCAT.TABLESPACES' );
 215+ if( $result == false ) {
 216+ $status->fatal( 'config-connection-error', '' );
 217+ }
 218+ else {
 219+ $nRows = $this->db->numRows( $result );
 220+ while ( $row = $row = $this->db->fetchRow( $result ) ) {
 221+ if( $row[0] >= 32768 ) {
 222+ return $status;
 223+ }
 224+ }
 225+ $status->fatal( 'config-ibm_db2-low-db-pagesize', '' );
 226+ }
 227+ } catch ( DBUnexpectedError $e ) {
 228+ $status->fatal( 'config-connection-error', $e->getMessage() );
 229+ }
 230+
 231+ return $status;
 232+ }
 233+
 234+ /**
 235+ * Generate the code to store the DB2-specific settings defined by the configuration form
 236+ * @return string
 237+ */
 238+ public function getLocalSettings() {
 239+ $schema = LocalSettingsGenerator::escapePhpString( $this->getVar( 'wgDBmwschema' ) );
 240+ $port = LocalSettingsGenerator::escapePhpString( $this->getVar( 'wgDBport' ) );
 241+ return
 242+"# IBM_DB2 specific settings
 243+\$wgDBmwschema = \"{$schema}\";
 244+\$wgDBport = \"{$port}\";";
 245+ }
 246+
 247+ public function __construct($parent) {
 248+ parent::__construct($parent);
 249+ }
 250+}
\ No newline at end of file
Property changes on: trunk/phase3/includes/installer/Ibm_db2Installer.php
___________________________________________________________________
Added: svn:eol-style
252251 + native
Index: trunk/phase3/includes/installer/Ibm_db2Updater.php
@@ -1,70 +1,69 @@
2 -<?php
3 -/**
4 - * IBM_DB2-specific updater.
5 - *
6 - * @file
7 - * @ingroup Deployment
8 - */
9 -
10 -/**
11 - * Class for handling updates to IBM_DB2 databases.
12 - *
13 - * @ingroup Deployment
14 - * @since 1.17
15 - */
16 -class Ibm_db2Updater extends DatabaseUpdater {
17 -
18 - /**
19 - * Get the changes in the DB2 database scheme since MediaWiki 1.14
20 - * @return array
21 - */
22 - protected function getCoreUpdateList() {
23 - return array(
24 - // 1.14
25 - array( 'addField', 'site_stats', 'ss_active_users', 'patch-ss_active_users.sql' ),
26 - array( 'addField', 'ipblocks', 'ipb_allow_usertalk', 'patch-ipb_allow_usertalk.sql' ),
27 -
28 - // 1.15
29 - array( 'addTable', 'change_tag', 'patch-change_tag.sql' ),
30 - array( 'addTable', 'tag_summary', 'patch-change_tag_summary.sql' ),
31 - array( 'addTable', 'valid_tag', 'patch-change_valid_tag.sql' ),
32 -
33 - // 1.16
34 - array( 'addTable', 'user_properties', 'patch-user_properties.sql' ),
35 - array( 'addTable', 'log_search', 'patch-log_search.sql' ),
36 - array( 'addField', 'logging', 'log_user_text', 'patch-log_user_text.sql' ),
37 - array( 'addTable', 'l10n_cache', 'patch-l10n_cache.sql' ),
38 - array( 'addTable', 'external_user', 'patch-external_user.sql' ),
39 - array( 'addIndex', 'log_search', 'ls_field_val', 'patch-log_search-rename-index.sql' ),
40 - array( 'addIndex', 'change_tag', 'change_tag_rc_tag', 'patch-change_tag-indexes.sql' ),
41 - array( 'addField', 'redirect', 'rd_interwiki', 'patch-rd_interwiki.sql' ),
42 -
43 - // 1.17
44 - array( 'addTable', 'iwlinks', 'patch-iwlinks.sql' ),
45 - array( 'addField', 'updatelog', 'ul_value', 'patch-ul_value.sql' ),
46 - array( 'addField', 'interwiki', 'iw_api', 'patch-iw_api_and_wikiid.sql' ),
47 - array( 'addField', 'categorylinks', 'cl_collation', 'patch-categorylinks-better-collation.sql' ),
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 - 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 - array( 'addIndex', 'msg_resource_links', 'uq61_msg_resource_links', 'patch-uq_61_msg_resource_links.sql' ),
59 - array( 'addIndex', 'msg_resource', 'uq81_msg_resource', 'patch-uq_81_msg_resource.sql' ),
60 - array( 'addIndex', 'module_deps', 'uq96_module_deps', 'patch-uq_96_module_deps.sql' ),
61 -
62 - // Fields
63 - array( 'addField', 'categorylinks', 'cl_sortkey_prefix', 'patch-cl_sortkey_prefix-field.sql' ),
64 - array( 'addField', 'categorylinks', 'cl_collation', 'patch-cl_collation-field.sql' ),
65 - 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' )
68 - );
69 - }
70 -}
71 -?>
 2+<?php
 3+/**
 4+ * IBM_DB2-specific updater.
 5+ *
 6+ * @file
 7+ * @ingroup Deployment
 8+ */
 9+
 10+/**
 11+ * Class for handling updates to IBM_DB2 databases.
 12+ *
 13+ * @ingroup Deployment
 14+ * @since 1.17
 15+ */
 16+class Ibm_db2Updater extends DatabaseUpdater {
 17+
 18+ /**
 19+ * Get the changes in the DB2 database scheme since MediaWiki 1.14
 20+ * @return array
 21+ */
 22+ protected function getCoreUpdateList() {
 23+ return array(
 24+ // 1.14
 25+ array( 'addField', 'site_stats', 'ss_active_users', 'patch-ss_active_users.sql' ),
 26+ array( 'addField', 'ipblocks', 'ipb_allow_usertalk', 'patch-ipb_allow_usertalk.sql' ),
 27+
 28+ // 1.15
 29+ array( 'addTable', 'change_tag', 'patch-change_tag.sql' ),
 30+ array( 'addTable', 'tag_summary', 'patch-change_tag_summary.sql' ),
 31+ array( 'addTable', 'valid_tag', 'patch-change_valid_tag.sql' ),
 32+
 33+ // 1.16
 34+ array( 'addTable', 'user_properties', 'patch-user_properties.sql' ),
 35+ array( 'addTable', 'log_search', 'patch-log_search.sql' ),
 36+ array( 'addField', 'logging', 'log_user_text', 'patch-log_user_text.sql' ),
 37+ array( 'addTable', 'l10n_cache', 'patch-l10n_cache.sql' ),
 38+ array( 'addTable', 'external_user', 'patch-external_user.sql' ),
 39+ array( 'addIndex', 'log_search', 'ls_field_val', 'patch-log_search-rename-index.sql' ),
 40+ array( 'addIndex', 'change_tag', 'change_tag_rc_tag', 'patch-change_tag-indexes.sql' ),
 41+ array( 'addField', 'redirect', 'rd_interwiki', 'patch-rd_interwiki.sql' ),
 42+
 43+ // 1.17
 44+ array( 'addTable', 'iwlinks', 'patch-iwlinks.sql' ),
 45+ array( 'addField', 'updatelog', 'ul_value', 'patch-ul_value.sql' ),
 46+ array( 'addField', 'interwiki', 'iw_api', 'patch-iw_api_and_wikiid.sql' ),
 47+ array( 'addField', 'categorylinks', 'cl_collation', 'patch-categorylinks-better-collation.sql' ),
 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+ 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+ array( 'addIndex', 'msg_resource_links', 'uq61_msg_resource_links', 'patch-uq_61_msg_resource_links.sql' ),
 59+ array( 'addIndex', 'msg_resource', 'uq81_msg_resource', 'patch-uq_81_msg_resource.sql' ),
 60+ array( 'addIndex', 'module_deps', 'uq96_module_deps', 'patch-uq_96_module_deps.sql' ),
 61+
 62+ // Fields
 63+ array( 'addField', 'categorylinks', 'cl_sortkey_prefix', 'patch-cl_sortkey_prefix-field.sql' ),
 64+ array( 'addField', 'categorylinks', 'cl_collation', 'patch-cl_collation-field.sql' ),
 65+ 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' )
 68+ );
 69+ }
 70+}
\ No newline at end of file
Property changes on: trunk/phase3/includes/installer/Ibm_db2Updater.php
___________________________________________________________________
Added: svn:eol-style
7271 + native
Index: trunk/phase3/maintenance/ibm_db2/patch-cl_collation-field.sql
@@ -1 +1 @@
2 -ALTER TABLE categorylinks ADD cl_collation VARCHAR(32) FOR BIT DATA NOT NULL
 2+ALTER TABLE categorylinks ADD cl_collation VARCHAR(32) FOR BIT DATA NOT NULL
Property changes on: trunk/phase3/maintenance/ibm_db2/patch-cl_collation-field.sql
___________________________________________________________________
Added: svn:eol-style
33 + native
Index: trunk/phase3/maintenance/ibm_db2/patch-categorylinks-better-collation.sql
@@ -1,21 +1,21 @@
2 -CREATE TABLE categorylinks (
3 - cl_from BIGINT NOT NULL DEFAULT 0,
4 - -- REFERENCES page(page_id) ON DELETE CASCADE,
5 - cl_to VARCHAR(255) NOT NULL,
6 - -- cl_sortkey has to be at least 86 wide
7 - -- in order to be compatible with the old MySQL schema from MW 1.10
8 - --cl_sortkey VARCHAR(86),
9 - cl_sortkey VARCHAR(230) FOR BIT DATA NOT NULL ,
10 - cl_sortkey_prefix VARCHAR(255) FOR BIT DATA NOT NULL ,
11 - cl_timestamp TIMESTAMP(3) NOT NULL,
12 - cl_collation VARCHAR(32) FOR BIT DATA NOT NULL ,
13 - cl_type VARCHAR(6) FOR BIT DATA NOT NULL
14 -);
 2+--
 3+-- patch-categorylinks-better-collation.sql
 4+--
 5+--
 6+-- Track category inclusions *used inline*
 7+-- This tracks a single level of category membership
 8+-- (folksonomic tagging, really).
 9+--
 10+CREATE TABLE categorylinks (
 11+ cl_from BIGINT NOT NULL DEFAULT 0,
 12+ -- REFERENCES page(page_id) ON DELETE CASCADE,
 13+ cl_to VARCHAR(255) NOT NULL,
 14+ -- cl_sortkey has to be at least 86 wide
 15+ -- in order to be compatible with the old MySQL schema from MW 1.10
 16+ --cl_sortkey VARCHAR(86),
 17+ cl_sortkey VARCHAR(230) FOR BIT DATA NOT NULL ,
 18+ cl_sortkey_prefix VARCHAR(255) FOR BIT DATA NOT NULL ,
 19+ cl_timestamp TIMESTAMP(3) NOT NULL,
 20+ cl_collation VARCHAR(32) FOR BIT DATA NOT NULL ,
 21+ cl_type VARCHAR(6) FOR BIT DATA NOT NULL
 22+);
Property changes on: trunk/phase3/maintenance/ibm_db2/patch-categorylinks-better-collation.sql
___________________________________________________________________
Added: svn:eol-style
1523 + native
Index: trunk/phase3/maintenance/ibm_db2/patch-log_user_text.sql
@@ -1,17 +1,17 @@
2 -CREATE TABLE logging (
3 - log_id BIGINT NOT NULL PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY (START WITH 1),
4 - --PRIMARY KEY DEFAULT nextval('log_log_id_seq'),
5 - log_type VARCHAR(32) NOT NULL,
6 - log_action VARCHAR(32) NOT NULL,
7 - log_timestamp TIMESTAMP(3) NOT NULL,
8 - log_user BIGINT NOT NULL DEFAULT 0,
9 - -- REFERENCES user(user_id) ON DELETE SET NULL,
10 - -- Name of the user who performed this action
11 - log_user_text VARCHAR(255) NOT NULL default '',
12 - log_namespace SMALLINT NOT NULL,
13 - log_title VARCHAR(255) NOT NULL,
14 - log_page BIGINT,
15 - log_comment VARCHAR(255),
16 - log_params CLOB(64K) INLINE LENGTH 4096,
17 - log_deleted SMALLINT NOT NULL DEFAULT 0
18 -);
 2+CREATE TABLE logging (
 3+ log_id BIGINT NOT NULL PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY (START WITH 1),
 4+ --PRIMARY KEY DEFAULT nextval('log_log_id_seq'),
 5+ log_type VARCHAR(32) NOT NULL,
 6+ log_action VARCHAR(32) NOT NULL,
 7+ log_timestamp TIMESTAMP(3) NOT NULL,
 8+ log_user BIGINT NOT NULL DEFAULT 0,
 9+ -- REFERENCES user(user_id) ON DELETE SET NULL,
 10+ -- Name of the user who performed this action
 11+ log_user_text VARCHAR(255) NOT NULL default '',
 12+ log_namespace SMALLINT NOT NULL,
 13+ log_title VARCHAR(255) NOT NULL,
 14+ log_page BIGINT,
 15+ log_comment VARCHAR(255),
 16+ log_params CLOB(64K) INLINE LENGTH 4096,
 17+ log_deleted SMALLINT NOT NULL DEFAULT 0
 18+);
Property changes on: trunk/phase3/maintenance/ibm_db2/patch-log_user_text.sql
___________________________________________________________________
Added: svn:eol-style
1919 + native
Index: trunk/phase3/maintenance/ibm_db2/patch-uq96_module_deps.sql
@@ -1,7 +1,7 @@
2 -CREATE UNIQUE INDEX "UQ96_MODULE_DEPS" ON "MODULE_DEPS"
3 -(
4 -"MD_MODULE"
5 -,"MD_SKIN"
6 -)
7 -ALLOW REVERSE SCANS
8 -;
 2+CREATE UNIQUE INDEX "UQ96_MODULE_DEPS" ON "MODULE_DEPS"
 3+(
 4+"MD_MODULE"
 5+,"MD_SKIN"
 6+)
 7+ALLOW REVERSE SCANS
 8+;
Property changes on: trunk/phase3/maintenance/ibm_db2/patch-uq96_module_deps.sql
___________________________________________________________________
Added: svn:eol-style
99 + native
Index: trunk/phase3/maintenance/ibm_db2/patch-iw_api-field.sql
@@ -1 +1 @@
2 -ALTER TABLE interwiki ADD iw_api CLOB(64K) INLINE LENGTH 4096 NOT NULL
 2+ALTER TABLE interwiki ADD iw_api CLOB(64K) INLINE LENGTH 4096 NOT NULL
Property changes on: trunk/phase3/maintenance/ibm_db2/patch-iw_api-field.sql
___________________________________________________________________
Added: svn:eol-style
33 + native
Index: trunk/phase3/maintenance/ibm_db2/patch-user_properties.sql
@@ -1,10 +1,10 @@
2 -CREATE TABLE user_properties (
3 - -- Foreign key to user.user_id
4 - up_user BIGINT NOT NULL,
5 -
6 - -- Name of the option being saved. This is indexed for bulk lookup.
7 - up_property VARCHAR(32) FOR BIT DATA NOT NULL,
8 -
9 - -- Property value as a string.
10 - up_value CLOB(64K) INLINE LENGTH 4096
11 -);
 2+CREATE TABLE user_properties (
 3+ -- Foreign key to user.user_id
 4+ up_user BIGINT NOT NULL,
 5+
 6+ -- Name of the option being saved. This is indexed for bulk lookup.
 7+ up_property VARCHAR(32) FOR BIT DATA NOT NULL,
 8+
 9+ -- Property value as a string.
 10+ up_value CLOB(64K) INLINE LENGTH 4096
 11+);
Property changes on: trunk/phase3/maintenance/ibm_db2/patch-user_properties.sql
___________________________________________________________________
Added: svn:eol-style
1212 + native
Index: trunk/phase3/maintenance/ibm_db2/patch-rd_interwiki.sql
@@ -1,8 +1,8 @@
2 -CREATE TABLE redirect (
3 - rd_from BIGINT NOT NULL PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY (START WITH 1),
4 - --REFERENCES page(page_id) ON DELETE CASCADE,
5 - rd_namespace SMALLINT NOT NULL DEFAULT 0,
6 - rd_title VARCHAR(255) NOT NULL DEFAULT '',
7 - rd_interwiki varchar(32),
8 - rd_fragment VARCHAR(255)
9 -);
 2+CREATE TABLE redirect (
 3+ rd_from BIGINT NOT NULL PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY (START WITH 1),
 4+ --REFERENCES page(page_id) ON DELETE CASCADE,
 5+ rd_namespace SMALLINT NOT NULL DEFAULT 0,
 6+ rd_title VARCHAR(255) NOT NULL DEFAULT '',
 7+ rd_interwiki varchar(32),
 8+ rd_fragment VARCHAR(255)
 9+);
Property changes on: trunk/phase3/maintenance/ibm_db2/patch-rd_interwiki.sql
___________________________________________________________________
Added: svn:eol-style
1010 + native
Index: trunk/phase3/maintenance/ibm_db2/patch-iw_api_and_wikiid.sql
@@ -1,8 +1,8 @@
2 -CREATE TABLE interwiki (
3 - iw_prefix VARCHAR(32) NOT NULL UNIQUE,
4 - iw_url CLOB(64K) INLINE LENGTH 4096 NOT NULL,
5 - iw_api CLOB(64K) INLINE LENGTH 4096 NOT NULL,
6 - iw_wikiid varchar(64) NOT NULL,
7 - iw_local SMALLINT NOT NULL,
8 - iw_trans SMALLINT NOT NULL DEFAULT 0
9 -);
 2+CREATE TABLE interwiki (
 3+ iw_prefix VARCHAR(32) NOT NULL UNIQUE,
 4+ iw_url CLOB(64K) INLINE LENGTH 4096 NOT NULL,
 5+ iw_api CLOB(64K) INLINE LENGTH 4096 NOT NULL,
 6+ iw_wikiid varchar(64) NOT NULL,
 7+ iw_local SMALLINT NOT NULL,
 8+ iw_trans SMALLINT NOT NULL DEFAULT 0
 9+);
Property changes on: trunk/phase3/maintenance/ibm_db2/patch-iw_api_and_wikiid.sql
___________________________________________________________________
Added: svn:eol-style
1010 + native
Index: trunk/phase3/maintenance/ibm_db2/patch-msg_resource_links.sql
@@ -1,6 +1,6 @@
2 -CREATE TABLE "MSG_RESOURCE_LINKS"
3 -(
4 -"MRL_RESOURCE" VARCHAR(255) FOR BIT DATA NOT NULL ,
5 -"MRL_MESSAGE" VARCHAR(255) FOR BIT DATA NOT NULL
6 -)
7 -;
 2+CREATE TABLE "MSG_RESOURCE_LINKS"
 3+(
 4+"MRL_RESOURCE" VARCHAR(255) FOR BIT DATA NOT NULL ,
 5+"MRL_MESSAGE" VARCHAR(255) FOR BIT DATA NOT NULL
 6+)
 7+;
Property changes on: trunk/phase3/maintenance/ibm_db2/patch-msg_resource_links.sql
___________________________________________________________________
Added: svn:eol-style
88 + native
Index: trunk/phase3/maintenance/ibm_db2/patch-msg_resource.sql
@@ -1,8 +1,8 @@
2 -CREATE TABLE "MSG_RESOURCE"
3 -(
4 -"MR_RESOURCE" VARCHAR(255) FOR BIT DATA NOT NULL ,
5 -"MR_LANG" VARCHAR(32) FOR BIT DATA NOT NULL ,
6 -"MR_BLOB" BLOB NOT NULL ,
7 -"MR_TIMESTAMP" TIMESTAMP(3) NOT NULL
8 -)
9 -;
 2+CREATE TABLE "MSG_RESOURCE"
 3+(
 4+"MR_RESOURCE" VARCHAR(255) FOR BIT DATA NOT NULL ,
 5+"MR_LANG" VARCHAR(32) FOR BIT DATA NOT NULL ,
 6+"MR_BLOB" BLOB NOT NULL ,
 7+"MR_TIMESTAMP" TIMESTAMP(3) NOT NULL
 8+)
 9+;
Property changes on: trunk/phase3/maintenance/ibm_db2/patch-msg_resource.sql
___________________________________________________________________
Added: svn:eol-style
1010 + native
Index: trunk/phase3/maintenance/ibm_db2/patch-change_tag_summary.sql
@@ -1,7 +1,7 @@
2 -CREATE TABLE tag_summary (
3 - ts_rc_id INTEGER,
4 - ts_log_id INTEGER,
5 - ts_rev_id INTEGER,
6 - ts_tags CLOB(64K) INLINE LENGTH 4096 NOT NULL
7 -);
 2+-- Rollup table to pull a LIST of tags simply
 3+CREATE TABLE tag_summary (
 4+ ts_rc_id INTEGER,
 5+ ts_log_id INTEGER,
 6+ ts_rev_id INTEGER,
 7+ ts_tags CLOB(64K) INLINE LENGTH 4096 NOT NULL
 8+);
Property changes on: trunk/phase3/maintenance/ibm_db2/patch-change_tag_summary.sql
___________________________________________________________________
Added: svn:eol-style
89 + native
Index: trunk/phase3/maintenance/ibm_db2/patch-l10n_cache.sql
@@ -1,8 +1,8 @@
2 -CREATE TABLE l10n_cache (
3 - -- Language code
4 - lc_lang VARCHAR(32) NOT NULL,
5 - -- Cache key
6 - lc_key VARCHAR(255) NOT NULL,
7 - -- Value
8 - lc_value CLOB(16M) INLINE LENGTH 4096 NOT NULL
9 -);
 2+CREATE TABLE l10n_cache (
 3+ -- Language code
 4+ lc_lang VARCHAR(32) NOT NULL,
 5+ -- Cache key
 6+ lc_key VARCHAR(255) NOT NULL,
 7+ -- Value
 8+ lc_value CLOB(16M) INLINE LENGTH 4096 NOT NULL
 9+);
Property changes on: trunk/phase3/maintenance/ibm_db2/patch-l10n_cache.sql
___________________________________________________________________
Added: svn:eol-style
1010 + native
Index: trunk/phase3/maintenance/ibm_db2/patch-change_valid_tag.sql
@@ -1,3 +1,3 @@
2 -CREATE TABLE valid_tag (
3 - vt_tag varchar(255) NOT NULL PRIMARY KEY
4 -);
 2+CREATE TABLE valid_tag (
 3+ vt_tag varchar(255) NOT NULL PRIMARY KEY
 4+);
Property changes on: trunk/phase3/maintenance/ibm_db2/patch-change_valid_tag.sql
___________________________________________________________________
Added: svn:eol-style
55 + native
Index: trunk/phase3/maintenance/ibm_db2/patch-module_deps.sql
@@ -1,6 +1,6 @@
2 -CREATE TABLE "MODULE_DEPS" (
3 -"MD_MODULE" VARCHAR(255) FOR BIT DATA NOT NULL ,
4 -"MD_SKIN" VARCHAR(32) FOR BIT DATA NOT NULL ,
5 -"MD_DEPS" CLOB(16M) INLINE LENGTH 4096 NOT NULL
6 -)
7 -;
 2+CREATE TABLE "MODULE_DEPS" (
 3+"MD_MODULE" VARCHAR(255) FOR BIT DATA NOT NULL ,
 4+"MD_SKIN" VARCHAR(32) FOR BIT DATA NOT NULL ,
 5+"MD_DEPS" CLOB(16M) INLINE LENGTH 4096 NOT NULL
 6+)
 7+;
Property changes on: trunk/phase3/maintenance/ibm_db2/patch-module_deps.sql
___________________________________________________________________
Added: svn:eol-style
88 + native
Index: trunk/phase3/maintenance/ibm_db2/patch-iw_wikiid-field.sql
@@ -1 +1 @@
2 -ALTER TABLE interwiki ADD iw_wikiid varchar(64) NOT NULL
 2+ALTER TABLE interwiki ADD iw_wikiid varchar(64) NOT NULL
Property changes on: trunk/phase3/maintenance/ibm_db2/patch-iw_wikiid-field.sql
___________________________________________________________________
Added: svn:eol-style
33 + native
Index: trunk/phase3/maintenance/ibm_db2/patch-ss_active_users.sql
@@ -1,11 +1,11 @@
2 -CREATE TABLE site_stats (
3 - ss_row_id BIGINT NOT NULL UNIQUE,
4 - ss_total_views BIGINT DEFAULT 0,
5 - ss_total_edits BIGINT DEFAULT 0,
6 - ss_good_articles BIGINT DEFAULT 0,
7 - ss_total_pages INTEGER DEFAULT -1,
8 - ss_users INTEGER DEFAULT -1,
9 - ss_active_users INTEGER DEFAULT -1,
10 - ss_admins INTEGER DEFAULT -1,
11 - ss_images INTEGER DEFAULT 0
12 -);
 2+CREATE TABLE site_stats (
 3+ ss_row_id BIGINT NOT NULL UNIQUE,
 4+ ss_total_views BIGINT DEFAULT 0,
 5+ ss_total_edits BIGINT DEFAULT 0,
 6+ ss_good_articles BIGINT DEFAULT 0,
 7+ ss_total_pages INTEGER DEFAULT -1,
 8+ ss_users INTEGER DEFAULT -1,
 9+ ss_active_users INTEGER DEFAULT -1,
 10+ ss_admins INTEGER DEFAULT -1,
 11+ ss_images INTEGER DEFAULT 0
 12+);
Property changes on: trunk/phase3/maintenance/ibm_db2/patch-ss_active_users.sql
___________________________________________________________________
Added: svn:eol-style
1313 + native
Index: trunk/phase3/maintenance/ibm_db2/patch-log_search.sql
@@ -1,8 +1,8 @@
2 -CREATE TABLE log_search (
3 - -- The type of ID (rev ID, log ID, rev TIMESTAMP(3), username)
4 - ls_field VARCHAR(32) FOR BIT DATA NOT NULL,
5 - -- The value of the ID
6 - ls_value varchar(255) NOT NULL,
7 - -- Key to log_id
8 - ls_log_id BIGINT NOT NULL default 0
9 -);
 2+CREATE TABLE log_search (
 3+ -- The type of ID (rev ID, log ID, rev TIMESTAMP(3), username)
 4+ ls_field VARCHAR(32) FOR BIT DATA NOT NULL,
 5+ -- The value of the ID
 6+ ls_value varchar(255) NOT NULL,
 7+ -- Key to log_id
 8+ ls_log_id BIGINT NOT NULL default 0
 9+);
Property changes on: trunk/phase3/maintenance/ibm_db2/patch-log_search.sql
___________________________________________________________________
Added: svn:eol-style
1010 + native
Index: trunk/phase3/maintenance/ibm_db2/patch-uq61_msg_resource_links.sql
@@ -1,7 +1,7 @@
2 -CREATE UNIQUE INDEX "UQ61_MSG_RESOURCE_LINKS" ON "MSG_RESOURCE_LINKS"
3 -(
4 -"MRL_MESSAGE",
5 -"MRL_RESOURCE"
6 -)
7 -ALLOW REVERSE SCANS
8 -;
 2+CREATE UNIQUE INDEX "UQ61_MSG_RESOURCE_LINKS" ON "MSG_RESOURCE_LINKS"
 3+(
 4+"MRL_MESSAGE",
 5+"MRL_RESOURCE"
 6+)
 7+ALLOW REVERSE SCANS
 8+;
Property changes on: trunk/phase3/maintenance/ibm_db2/patch-uq61_msg_resource_links.sql
___________________________________________________________________
Added: svn:eol-style
99 + native
Index: trunk/phase3/maintenance/ibm_db2/patch-uq81_msg_resource.sql
@@ -1,7 +1,7 @@
2 -CREATE UNIQUE INDEX "UQ81_MSG_RESOURCE" ON "MSG_RESOURCE"
3 -(
4 -"MR_RESOURCE"
5 -,"MR_LANG"
6 -)
7 -ALLOW REVERSE SCANS
8 -;
 2+CREATE UNIQUE INDEX "UQ81_MSG_RESOURCE" ON "MSG_RESOURCE"
 3+(
 4+"MR_RESOURCE"
 5+,"MR_LANG"
 6+)
 7+ALLOW REVERSE SCANS
 8+;
Property changes on: trunk/phase3/maintenance/ibm_db2/patch-uq81_msg_resource.sql
___________________________________________________________________
Added: svn:eol-style
99 + native
Index: trunk/phase3/maintenance/ibm_db2/patch-cl_sortkey_prefix-field.sql
@@ -1 +1 @@
2 -ALTER TABLE categorylinks ADD cl_sortkey_prefix VARCHAR(255) FOR BIT DATA NOT NULL
 2+ALTER TABLE categorylinks ADD cl_sortkey_prefix VARCHAR(255) FOR BIT DATA NOT NULL
Property changes on: trunk/phase3/maintenance/ibm_db2/patch-cl_sortkey_prefix-field.sql
___________________________________________________________________
Added: svn:eol-style
33 + native
Index: trunk/phase3/maintenance/ibm_db2/patch-ul_value.sql
@@ -1,3 +1,3 @@
2 -CREATE TABLE updatelog (
3 - ul_key VARCHAR(255) NOT NULL PRIMARY KEY
4 -);
 2+CREATE TABLE updatelog (
 3+ ul_key VARCHAR(255) NOT NULL PRIMARY KEY
 4+);
Property changes on: trunk/phase3/maintenance/ibm_db2/patch-ul_value.sql
___________________________________________________________________
Added: svn:eol-style
55 + native
Index: trunk/phase3/maintenance/ibm_db2/patch-change_tag-indexes.sql
@@ -1,5 +1,5 @@
2 -CREATE UNIQUE INDEX change_tag_rc_tag ON change_tag (ct_rc_id,ct_tag);
3 -CREATE UNIQUE INDEX change_tag_log_tag ON change_tag (ct_log_id,ct_tag);
4 -CREATE UNIQUE INDEX change_tag_rev_tag ON change_tag (ct_rev_id,ct_tag);
5 -CREATE INDEX change_tag_tag_id ON change_tag (ct_tag,ct_rc_id,ct_rev_id,ct_log_id);
 2+CREATE UNIQUE INDEX change_tag_rc_tag ON change_tag (ct_rc_id,ct_tag);
 3+CREATE UNIQUE INDEX change_tag_log_tag ON change_tag (ct_log_id,ct_tag);
 4+CREATE UNIQUE INDEX change_tag_rev_tag ON change_tag (ct_rev_id,ct_tag);
 5+-- Covering index, so we can pull all the info only out of the index.
 6+CREATE INDEX change_tag_tag_id ON change_tag (ct_tag,ct_rc_id,ct_rev_id,ct_log_id);
Property changes on: trunk/phase3/maintenance/ibm_db2/patch-change_tag-indexes.sql
___________________________________________________________________
Added: svn:eol-style
67 + native
Index: trunk/phase3/maintenance/ibm_db2/patch-iwlinks.sql
@@ -1,7 +1,7 @@
2 -CREATE TABLE "IWLINKS"
3 -(
4 -"IWL_FROM" INT NOT NULL ,
5 -"IWL_PREFIX" VARCHAR(20) FOR BIT DATA NOT NULL ,
6 -"IWL_TITLE" VARCHAR(255) FOR BIT DATA NOT NULL
7 -)
8 -;
 2+CREATE TABLE "IWLINKS"
 3+(
 4+"IWL_FROM" INT NOT NULL ,
 5+"IWL_PREFIX" VARCHAR(20) FOR BIT DATA NOT NULL ,
 6+"IWL_TITLE" VARCHAR(255) FOR BIT DATA NOT NULL
 7+)
 8+;
Property changes on: trunk/phase3/maintenance/ibm_db2/patch-iwlinks.sql
___________________________________________________________________
Added: svn:eol-style
99 + native
Index: trunk/phase3/maintenance/ibm_db2/patch-external_user.sql
@@ -1,7 +1,7 @@
2 -CREATE TABLE external_user (
3 - -- Foreign key to user_id
4 - eu_local_id BIGINT NOT NULL PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY (START WITH 1),
5 -
6 - -- Some opaque identifier provided by the external database
7 - eu_external_id VARCHAR(255) NOT NULL
8 -);
 2+CREATE TABLE external_user (
 3+ -- Foreign key to user_id
 4+ eu_local_id BIGINT NOT NULL PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY (START WITH 1),
 5+
 6+ -- Some opaque identifier provided by the external database
 7+ eu_external_id VARCHAR(255) NOT NULL
 8+);
Property changes on: trunk/phase3/maintenance/ibm_db2/patch-external_user.sql
___________________________________________________________________
Added: svn:eol-style
99 + native
Index: trunk/phase3/maintenance/ibm_db2/patch-cl_type-field.sql
@@ -1 +1 @@
2 -ALTER TABLE categorylinks ADD cl_type VARCHAR(6) FOR BIT DATA NOT NULL
 2+ALTER TABLE categorylinks ADD cl_type VARCHAR(6) FOR BIT DATA NOT NULL
Property changes on: trunk/phase3/maintenance/ibm_db2/patch-cl_type-field.sql
___________________________________________________________________
Added: svn:eol-style
33 + native
Index: trunk/phase3/maintenance/ibm_db2/patch-change_tag.sql
@@ -1,8 +1,8 @@
2 -CREATE TABLE change_tag (
3 - ct_rc_id INTEGER,
4 - ct_log_id INTEGER,
5 - ct_rev_id INTEGER,
6 - ct_tag varchar(255) NOT NULL,
7 - ct_params CLOB(64K) INLINE LENGTH 4096
8 -);
 2+-- A table to track tags for revisions, logs and recent changes.
 3+CREATE TABLE change_tag (
 4+ ct_rc_id INTEGER,
 5+ ct_log_id INTEGER,
 6+ ct_rev_id INTEGER,
 7+ ct_tag varchar(255) NOT NULL,
 8+ ct_params CLOB(64K) INLINE LENGTH 4096
 9+);
Property changes on: trunk/phase3/maintenance/ibm_db2/patch-change_tag.sql
___________________________________________________________________
Added: svn:eol-style
910 + native
Index: trunk/phase3/maintenance/ibm_db2/patch-log_search-rename-index.sql
@@ -1,8 +1,8 @@
2 -CREATE TABLE log_search (
3 - -- The type of ID (rev ID, log ID, rev TIMESTAMP(3), username)
4 - ls_field VARCHAR(32) FOR BIT DATA NOT NULL,
5 - -- The value of the ID
6 - ls_value varchar(255) NOT NULL,
7 - -- Key to log_id
8 - ls_log_id BIGINT NOT NULL default 0
9 -);
 2+CREATE TABLE log_search (
 3+ -- The type of ID (rev ID, log ID, rev TIMESTAMP(3), username)
 4+ ls_field VARCHAR(32) FOR BIT DATA NOT NULL,
 5+ -- The value of the ID
 6+ ls_value varchar(255) NOT NULL,
 7+ -- Key to log_id
 8+ ls_log_id BIGINT NOT NULL default 0
 9+);
Property changes on: trunk/phase3/maintenance/ibm_db2/patch-log_search-rename-index.sql
___________________________________________________________________
Added: svn:eol-style
1010 + native
Index: trunk/phase3/maintenance/ibm_db2/patch-ipb_allow_usertalk.sql
@@ -1,23 +1,23 @@
2 -CREATE TABLE ipblocks (
3 - ipb_id INTEGER NOT NULL PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY (START WITH 1),
4 - --DEFAULT nextval('ipblocks_ipb_id_val'),
5 - ipb_address VARCHAR(1024),
6 - ipb_user BIGINT NOT NULL DEFAULT 0,
7 - -- REFERENCES user(user_id) ON DELETE SET NULL,
8 - ipb_by BIGINT NOT NULL DEFAULT 0,
9 - -- REFERENCES user(user_id) ON DELETE CASCADE,
10 - ipb_by_text VARCHAR(255) NOT NULL DEFAULT '',
11 - ipb_reason VARCHAR(1024) NOT NULL,
12 - ipb_timestamp TIMESTAMP(3) NOT NULL,
13 - ipb_auto SMALLINT NOT NULL DEFAULT 0,
14 - ipb_anon_only SMALLINT NOT NULL DEFAULT 0,
15 - ipb_create_account SMALLINT NOT NULL DEFAULT 1,
16 - ipb_enable_autoblock SMALLINT NOT NULL DEFAULT 1,
17 - ipb_expiry TIMESTAMP(3) NOT NULL,
18 - ipb_range_start VARCHAR(1024),
19 - ipb_range_end VARCHAR(1024),
20 - ipb_deleted SMALLINT NOT NULL DEFAULT 0,
21 - ipb_block_email SMALLINT NOT NULL DEFAULT 0,
22 - ipb_allow_usertalk SMALLINT NOT NULL DEFAULT 0
23 -
24 -);
 2+CREATE TABLE ipblocks (
 3+ ipb_id INTEGER NOT NULL PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY (START WITH 1),
 4+ --DEFAULT nextval('ipblocks_ipb_id_val'),
 5+ ipb_address VARCHAR(1024),
 6+ ipb_user BIGINT NOT NULL DEFAULT 0,
 7+ -- REFERENCES user(user_id) ON DELETE SET NULL,
 8+ ipb_by BIGINT NOT NULL DEFAULT 0,
 9+ -- REFERENCES user(user_id) ON DELETE CASCADE,
 10+ ipb_by_text VARCHAR(255) NOT NULL DEFAULT '',
 11+ ipb_reason VARCHAR(1024) NOT NULL,
 12+ ipb_timestamp TIMESTAMP(3) NOT NULL,
 13+ ipb_auto SMALLINT NOT NULL DEFAULT 0,
 14+ ipb_anon_only SMALLINT NOT NULL DEFAULT 0,
 15+ ipb_create_account SMALLINT NOT NULL DEFAULT 1,
 16+ ipb_enable_autoblock SMALLINT NOT NULL DEFAULT 1,
 17+ ipb_expiry TIMESTAMP(3) NOT NULL,
 18+ ipb_range_start VARCHAR(1024),
 19+ ipb_range_end VARCHAR(1024),
 20+ ipb_deleted SMALLINT NOT NULL DEFAULT 0,
 21+ ipb_block_email SMALLINT NOT NULL DEFAULT 0,
 22+ ipb_allow_usertalk SMALLINT NOT NULL DEFAULT 0
 23+
 24+);
Property changes on: trunk/phase3/maintenance/ibm_db2/patch-ipb_allow_usertalk.sql
___________________________________________________________________
Added: svn:eol-style
2525 + native

Status & tagging log