Open main menu

Manual:$wgDBmwschema

This page is a translated version of the page Manual:$wgDBmwschema and the translation is 17% complete.

Other languages:
English • ‎español • ‎français • ‎magyar • ‎polski • ‎português do Brasil • ‎中文 • ‎日本語
Preferencias de base de datos: $wgDBmwschema
Schema that stores the MediaWiki tables in.
Introducido en la versión:1.8.0
Eliminado en la versión:aún se usa
Valores permitidos:(string)
Valor predeterminado:null (1.23+)
'mediawiki' (prior to 1.23)
Otros configuración: Alfabéticamente | Por Función

Detalles

Schema for mediawiki tables. It was originally only used if your backend database was Postgres/MSSQL. Since MediaWiki 1.31 it affects other database types too. This indicates what schema the main mediawiki tables live in, and is roughly equivalent to the way that $wgDBprefix is used by MySQL.

The installer of old MediaWiki versions were setting this to 'mediawiki' in LocalSettings.php directly, even for MySQL databases, which may cause errors when upgrading. If you get errors when upgrading to MediaWiki 1.31 or later and you're not using Postgres/MSSQL as database backend, remove this setting from LocalSettings.php.

  Atención:
  • No modifiques el valor de $wgDBmwschema después de que se haya incluido Setup.php . Nota: Setup.php inicializa varias rutas, incluye algunos archivos comunes, inicia sesiones y realiza algunas otras tareas de configuración cuando se recibe una petición. No guarda relación con la instalación ni con la configuración de MediaWiki.
  • Only files in includes/db/ should use $wgDBmwschema, while everything else should use the dbSchema() method provided by the Wikimedia\Rdbms\IDatabase interface or extract it from the getDomainId() method in either the Wikimedia\Rdbms\ILoadBalancer or the Wikimedia\Rdbms\ILBFactory interface. The DatabaseDomain class can extract such components from a database domain ID.
  • If you configure $wgDBservers or $wgLBFactoryConf, you still need to define $wgDBname, $wgDBmwschema (if applicable for the DB type), and $wgDBprefix (if applicable for the DB type). The combination of $wgDBname, $wgDBmwschema, and $wgDBprefix define the current wiki's database domain. This is also called the local database domain. The 'dbname' and 'tablePrefix' settings in $wgDBservers and $wgLBFactoryConf only define the default DB/prefix when a connection is requested with DatabaseDomain::newUnspecified()->getId() (the empty string) as the database domain, e.g. wfGetDB( DB_REPLICA, [], '' ). Note that functions calls like wfGetDB( DB_REPLICA ), which simply omit the database domain, are assumed to refer to the local database domain.
  Advertencia: If you change this setting, you should probably create a new user (and change $wgDBuser as well), because the configuration script sets the user's default path to include the schema.