Changes

Jump to navigation Jump to search
40 bytes removed ,  18:08, 21 December 2019
m
Text replacement - "<tvar|2>" to ""
Line 4: Line 4:  
| =
 
| =
 
{{Caution|1=<nowiki/>
 
{{Caution|1=<nowiki/>
*  Do not change <tvar|1><code>$wgDBmwschema</code> after <tvar|2>{{ll|Manual:Setup.php|Setup.php}} has been included. ''' Note:'''  <tvar|1>{{ll|Manual:Setup.php|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.
+
*  Do not change <tvar|1><code>$wgDBmwschema</code> after {{ll|Manual:Setup.php|Setup.php}} has been included. ''' Note:'''  <tvar|1>{{ll|Manual:Setup.php|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 <tvar|1>'''<code>{{git file|file=includes/db/}}</code>''' should use <tvar|2><code>$wgDBmwschema</code>, while everything else should use the <tvar|3>{{Class doclink|Wikimedia\Rdbms\IDatabase|type=interface|anchor= aebbee8083d4650a61479f3adbf37759e|dbSchema()}}</code> method provided by the <tvar|4><code>{{Class doclink|Wikimedia\Rdbms\IDatabase|type=interface}}</code> interface or extract it from the <tvar|5><code>getDomainId()</code> method in either the <tvar|6><code>{{Class doclink|Wikimedia\Rdbms\ILoadBalancer|type=interface}}</code> or the <tvar|7><code>{{Class doclink|Wikimedia\Rdbms\ILBFactory|type=interface}}</code> interface.  The <tvar|1><code>DatabaseDomain</code> class can extract such components from a database domain ID.
+
*  Only files in <tvar|1>'''<code>{{git file|file=includes/db/}}</code>''' should use <code>$wgDBmwschema</code>, while everything else should use the <tvar|3>{{Class doclink|Wikimedia\Rdbms\IDatabase|type=interface|anchor= aebbee8083d4650a61479f3adbf37759e|dbSchema()}}</code> method provided by the <tvar|4><code>{{Class doclink|Wikimedia\Rdbms\IDatabase|type=interface}}</code> interface or extract it from the <tvar|5><code>getDomainId()</code> method in either the <tvar|6><code>{{Class doclink|Wikimedia\Rdbms\ILoadBalancer|type=interface}}</code> or the <tvar|7><code>{{Class doclink|Wikimedia\Rdbms\ILBFactory|type=interface}}</code> interface.  The <tvar|1><code>DatabaseDomain</code> class can extract such components from a database domain ID.
*  If you configure <tvar|1><code>$wgDBservers</code> or <tvar|2><code>$wgLBFactoryConf</code>, you still need to define <tvar|3><code>$wgDBname</code>, <tvar|4><code>$wgDBmwschema</code> (if applicable for the DB type), and <tvar|5><code>$wgDBprefix</code> (if applicable for the DB type).  The combination of <tvar|1><code>$wgDBname</code>, <tvar|2><code>$wgDBmwschema</code>, and <tvar|3><code>$wgDBprefix</code> define the current wiki's ''database domain''.  This is also called the ''local database domain''.  The '<tvar|1>dbname' and '<tvar|2>tablePrefix' settings in <tvar|3><code>$wgDBservers</code> and <tvar|4><code>$wgLBFactoryConf</code> only define the default DB/prefix when a connection is requested with <tvar|5><code>DatabaseDomain::newUnspecified()->getId()</code> (the empty string) as the database domain, e.g. <tvar|6><code>wfGetDB( DB_REPLICA, [], <nowiki>''</nowiki> )</code>.  Note that functions calls like <tvar|1><code>wfGetDB( DB_REPLICA )</code>, which simply omit the database domain, are assumed to refer to the local database domain.
+
*  If you configure <tvar|1><code>$wgDBservers</code> or <code>$wgLBFactoryConf</code>, you still need to define <tvar|3><code>$wgDBname</code>, <tvar|4><code>$wgDBmwschema</code> (if applicable for the DB type), and <tvar|5><code>$wgDBprefix</code> (if applicable for the DB type).  The combination of <tvar|1><code>$wgDBname</code>, <code>$wgDBmwschema</code>, and <tvar|3><code>$wgDBprefix</code> define the current wiki's ''database domain''.  This is also called the ''local database domain''.  The '<tvar|1>dbname' and 'tablePrefix' settings in <tvar|3><code>$wgDBservers</code> and <tvar|4><code>$wgLBFactoryConf</code> only define the default DB/prefix when a connection is requested with <tvar|5><code>DatabaseDomain::newUnspecified()->getId()</code> (the empty string) as the database domain, e.g. <tvar|6><code>wfGetDB( DB_REPLICA, [], <nowiki>''</nowiki> )</code>.  Note that functions calls like <tvar|1><code>wfGetDB( DB_REPLICA )</code>, which simply omit the database domain, are assumed to refer to the local database domain.
 
}}
 
}}
 
| #default=
 
| #default=
4,000

edits

Navigation menu