* Query whether a given table exists (in the given schema, or the default mw one if not given)
*/
function tableExists( $table ) {
+ $table = trim($this->tableName($table), '"');
$SQL = "SELECT 1 FROM user_tables WHERE table_name='$table'";
$res = $this->doQuery( $SQL );
if ( $res ) {
}
// Set the relevant variables from LocalSettings.php
- $requiredVars = array( 'wgDBtype', 'wgDBuser', 'wgDBpassword' );
+ $requiredVars = array( 'wgDBtype', 'wgDBuser', 'wgDBpassword', 'wgDBname', 'wgDBserver' );
$status = $this->importVariables( $requiredVars , $vars );
$installer = $this->parent->getDBInstaller();
$status->merge( $this->importVariables( $installer->getGlobalNames(), $vars ) );
ALTER TABLE &mw_prefix.image MODIFY img_bits DEFAULT 0 NOT NULL;
ALTER TABLE &mw_prefix.image MODIFY img_user DEFAULT 0 NOT NULL;
-ALTER TABLE &mw_prefix.interwiki ADD iw_api BLOB NOT NULL;
+ALTER TABLE &mw_prefix.interwiki ADD iw_api BLOB DEFAULT EMPTY_BLOB();
+ALTER TABLE &mw_prefix.interwiki MODIFY iw_api DEFAULT NULL NOT NULL;
ALTER TABLE &mw_prefix.interwiki ADD iw_wikiid VARCHAR2(64);
ALTER TABLE &mw_prefix.ipblocks MODIFY ipb_user DEFAULT 0 NOT NULL;