Manual:SQL patch file/ja

You might write an SQL file either for a schema change in the core (see Development_policy#Database_patches, ) or for an extension (see ).

例
テーブルを作成するための SQL ファイルは、以下のようになるでしょう:

変数の置換
will be replaced with. will be replaced with an index prefix. will be replaced with the value of. These three need to be used in patch files, as in the example above. There are other variable replacements but they are not used in practice. See the documentation of DatabaseBase::replaceVars for the full list.

外部リンク

 * W3Schools, CREATE TABLE
 * W3Schools, ALTER TABLE - 列の追加、変更、削除に使用されます