|This page documents a MediaWiki development guideline, crafted over time by developer consensus (or sometimes by proclamation from a lead developer)|
This page describes the coding conventions used within files of the MediaWiki codebase written for usage with a Database. See also the general conventions that apply to all program languages, including those for databases. If you would like a short checklist to help you review your commits, try using the Pre-commit checklist.
Use abstract schema for new tables or schema changes. See Manual:Schema changes for more information.
- Table names should be singular nouns:
revision, etc. There are some historical exceptions:
- Column names are given a prefix derived from the table name: the name itself if it's short, or an abbreviation:
Changing the schema
See Development policy#Database_patches, especially Special:Diff/537762/prev and make sure you use abstract schema changes.