if ( !is_array( $types ) ) {
$types = [ $types ];
}
- if ( !$schema ) {
+ if ( $schema === false ) {
$schema = $this->getCoreSchema();
}
$table = $this->realTableName( $table, 'raw' );
function strencode( $s ) {
// Should not be called by us
-
return pg_escape_string( $this->getBindingHandle(), $s );
}
/**
* Used by getDB() / setDB()
- * @var IDatabase
+ * @var Database
*/
private $mDb = null;
if ( is_array( $wgProfiler ) && isset( $wgProfiler['class'] ) ) {
$class = $wgProfiler['class'];
+ /** @var Profiler $profiler */
$profiler = new $class(
[ 'sampling' => 1, 'output' => [ $output ] ]
+ $wgProfiler
$this->beginTransaction( $dbw, __METHOD__ );
# Get "active" text records from the revisions table
+ $cur = [];
$this->output( 'Searching for active text records in revisions table...' );
$res = $dbw->select( 'revision', 'rev_text_id', [], __METHOD__, [ 'DISTINCT' ] );
foreach ( $res as $row ) {
$this->output( "Going to run database updates for " . wfWikiID() . "\n" );
if ( $db->getType() === 'sqlite' ) {
+ /** @var Database|DatabaseSqlite $db */
$this->output( "Using SQLite file: '{$db->getDbFilePath()}'\n" );
}
$this->output( "Depending on the size of your database this may take a while!\n" );