try {
$db = Database::factory( 'postgres', [
'host' => $this->getVar( 'wgDBserver' ),
+ 'port' => $this->getVar( 'wgDBport' ),
'user' => $user,
'password' => $password,
'dbname' => $dbName,
- 'schema' => $schema ] );
+ 'schema' => $schema,
+ 'keywordTableMap' => [ 'user' => 'mwuser', 'text' => 'pagecontent' ],
+ ] );
$status->value = $db;
} catch ( DBConnectionError $e ) {
$status->fatal( 'config-connection-error', $e->getMessage() );
return $status;
}
- /**
- * @var $conn Database
- */
+ /** @var $conn DatabasePostgres */
$conn = $status->value;
if ( $conn->tableExists( 'archive' ) ) {
return $status;
}
- $error = $conn->sourceFile( $conn->getSchemaPath() );
+ $error = $conn->sourceFile( $this->getSchemaPath( $conn ) );
if ( $error !== true ) {
$conn->reportQueryError( $error, 0, '', __METHOD__ );
$conn->rollback( __METHOD__ );