Manual:$wgDBmwschema

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Manual:$wgDBmwschema and the translation is 42% complete.

Outdated translations are marked like this.
Other languages:
English • ‎español • ‎français • ‎magyar • ‎polski • ‎português do Brasil • ‎中文 • ‎日本語
Configurações de banco de dados: $wgDBmwschema
Esquema em que o Postgres armazena as tabelas do MediaWiki.
Introduzido na versão:1.8.0
Removido na versão:ainda em uso
Valores permitidos:(string)
Valor padrão:null (1.23+)
'mediawiki' (prior to 1.23)

Detalhes

Esquema para tabelas do MediaWiki.

Atualmente, apenas usado se o seu banco de dados de back-end é o PostgreSQL.

Since MediaWiki 1.31 it affects other database types too.

Indica em qual esquema as principais tabelas do MediaWiki estão, e é mais ou menos equivalente à maneira que $wgDBprefix é usado pelo 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.

Atenção! Atenção:
  • Do not change $wgDBmwschema after Setup.php has been included. Note: Setup.php initializes various paths, includes some common files, starts sessions, and performs various other setup tasks for a request. It is not related to the installation or setup of 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.
Atenção Atenção: Se você alterar essa configuração, você provavelmente deve criar um novo usuário (e alterar a variável $wgDBuser também), porque o script de configuração define o caminho padrão do usuário para incluir o esquema.