The [[ https://www.mediawiki.org/wiki/Manual:Database_layout | database layout documentation ]] includes a [[ https://www.mediawiki.org/wiki/File:MediaWiki database schema latest.svg | big diagram]] of the MediaWiki tables. This is a redirect on commons to a diagram of the DB tables in MediaWiki release 1.20, built in 2012.
I think there has only been one major table change since then (new `sites` table) but there have been many small tweaks.
[[ https://commons.wikimedia.org/wiki/File:MediaWiki_1.20_%2844edaa2%29_database_schema.svg | The SVG file on commons ]] has fantastic details on how to update it. If and when someone does so, a few things we might do:
- Consider another SQL doc tool. E.g. SchemaSpy can generate a diagram of a schema, but also an entire web site for the schema that we can place on https://doc.wikimedia.org
- Maybe link directly to the SVG file in [[ https://www.mediawiki.org/wiki/Manual:Database_layout/viewbox | Manual:Database_layout/viewbox ]], Firefox and Chrome seem to render the SVG better than the 2500-pixel png of the diagram
- Make the SVG text searchable. (Maybe it's drawing the font outlines). For such a large file, search is pretty important.
- Generate as a PDF as well.
- Store the `.mwb` file in core's `docs` directory in git instead of [[ https://github.com/Krinkle/ts-krinkle-misc/blob/gh-pages/mwDatabaseSchema/REL1_20/mediawiki-REL1_20-44edaa2.mwb | an external repo]].