Manual:SQL patch file/zh

您可以为核心中的模式更改(参见发展政策#数据库补丁，)或扩展(参见)编写一个SQL文件. 另见一般数据库编码约定.

示例
用于创建表的SQL文件可能如下所示：



变量替换
前两个需要在补丁文件中使用，如上例所示.


 * 将替换为.
 * is used to identify indexes so their name can be changed via the index alias system. (This was only ever used for a small number of core tables and has been removed in MediaWiki 1.35, so in practice this does not make any difference.)
 * will be replaced with the value of.
 * is only used for database backends.

There are other variable replacements but they are not used in practice. See the documentation of for the full list.