मैनुअल:$wgDBprefix

This page is a translated version of the page Manual:$wgDBprefix and the translation is 100% complete.
Database settings: $wgDBprefix
तालिका का नाम उपसर्ग।
Introduced in version:1.4.0
Removed in version:still in use
Allowed values:(डोरी)
Default value:''

विवरण

तालिका का नाम उपसर्ग। यह अल्फ़ान्यूमेरिक होना चाहिए, न तो रिक्त स्थान और न ही हाइफ़न, और "_" में समाप्त होना चाहिए। यदि आपके पास केवल एक डेटाबेस तक पहुंच है और आप मीडियाविकि के एक से अधिक संस्करण स्थापित करना चाहते हैं, या अन्य एप्लिकेशन हैं जो डेटाबेस का भी उपयोग करते हैं, आप किसी भी नामकरण संघर्ष या भ्रम को रोकने के लिए तालिका नामों को एक अद्वितीय उपसर्ग दे सकते हैं।

उदाहरण के लिए, यदि आप उपसर्ग 'विकी_' का उपयोग करते हैं तो इसके बजाय तालिका 'पेज' का नाम 'विकी_पेज' होगा।

प्रारंभिक कॉन्फ़िगरेशन के समय आपको इसे सेट करना होगा, या बाद की तारीख में मैन्युअल रूप से तालिका नाम बदलना होगा। इस सेटिंग को बदलने से आपके डेटाबेस में तालिकाओं के नाम स्वचालित रूप से अपडेट नहीं होते हैं।

यदि आपका डेटाबेस पोस्टग्रेएसक्यूएल है तो यह सेटिंग NOT उपयोग की जाती है: इसके बजाय, स्कीमा का उपयोग किया जाता है ($wgDBmwschema देखें)।[1]

सामान्य मूल्य

कई इंस्टॉलर डिफ़ॉल्ट रूप से डेटाबेस तालिका उपसर्ग "$wgDBprefix" को "mw_" पर सेट करते हैं।[2][3][4]

  सावधान:
  • 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.

संदर्भ


यह सभी देखें