dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "mw.htmlform: Fix hiding of the textbox for 'selectorother' fields on page...
[lhc/web/wiklou.git]
/
includes
/
installer
/
MssqlUpdater.php
diff --git
a/includes/installer/MssqlUpdater.php
b/includes/installer/MssqlUpdater.php
index
968ee15
..
b4de44d
100644
(file)
--- a/
includes/installer/MssqlUpdater.php
+++ b/
includes/installer/MssqlUpdater.php
@@
-21,6
+21,8
@@
* @ingroup Deployment
*/
* @ingroup Deployment
*/
+use Wikimedia\Rdbms\DatabaseMssql;
+
/**
* Class for setting up the MediaWiki database using Microsoft SQL Server.
*
/**
* Class for setting up the MediaWiki database using Microsoft SQL Server.
*
@@
-97,6
+99,11
@@
class MssqlUpdater extends DatabaseUpdater {
// 1.29
[ 'addField', 'externallinks', 'el_index_60', 'patch-externallinks-el_index_60.sql' ],
// 1.29
[ 'addField', 'externallinks', 'el_index_60', 'patch-externallinks-el_index_60.sql' ],
+ [ 'dropIndex', 'oldimage', 'oi_name_archive_name',
+ 'patch-alter-table-oldimage.sql' ],
+
+ // 1.30
+ [ 'modifyField', 'image', 'img_media_type', 'patch-add-3d.sql' ],
];
}
];
}
@@
-110,7
+117,9
@@
class MssqlUpdater extends DatabaseUpdater {
/**
* General schema update for a table that touches more than one field or requires
/**
* General schema update for a table that touches more than one field or requires
- * destructive actions (such as dropping and recreating the table).
+ * destructive actions (such as dropping and recreating the table). NOTE: Usage of
+ * this function is highly discouraged, use it's successor DatabaseUpdater::modifyTable
+ * instead.
*
* @param string $table
* @param string $updatekey
*
* @param string $table
* @param string $updatekey
@@
-123,9
+132,11
@@
class MssqlUpdater extends DatabaseUpdater {
} elseif ( $this->updateRowExists( $updatekey ) ) {
$this->output( "...$table already had schema updated by $patch.\n" );
} else {
} elseif ( $this->updateRowExists( $updatekey ) ) {
$this->output( "...$table already had schema updated by $patch.\n" );
} else {
- $this->insertUpdateRow( $updatekey );
-
- return $this->applyPatch( $patch, $fullpath, "Updating schema of table $table" );
+ $apply = $this->applyPatch( $patch, $fullpath, "Updating schema of table $table" );
+ if ( $apply ) {
+ $this->insertUpdateRow( $updatekey );
+ }
+ return $apply;
}
return true;
}
return true;