Manual:Database layout/diagram instructions

Data source
The data source and MySQL Workbench files used to generate the SVG is published at Krinkle/mwDatabaseSchema on GitHub.

Create diagram
If in doubt, ask Krinkle.


 * 1) Download and install MySQL Workbench.
 * 2) Download   from the latest stable MediaWiki version (currently:  ). Checkout the tag using Git, or download the tarball. If downloading from the web viewer, be sure to save as ".sql" instead of ".txt".
 * 3) Create new MySQL Workbench Model document.
 * 4) Use "File / Import / Reverse Engineer SQL Script" to import MediaWiki's  . Be sure to use UTF-8 encoding and tick "Place imported objects on a diagram". Import of SQL script file '~/Downloads/.tables.sql' has finished. 50 tables, 0 views and 0 stored procedures were imported in 0 schemas.
 * 5) The tables are now drawn on the canvas. They're not organised yet, though. Use the  guide.
 * 6) Export to SVG.
 * 7) Upload to Commons as   (Do not overwrite any existing diagram on Commons).
 * 8) *Add  to the Information template.
 * 9) Add it to  MediaWiki.
 * 10) Update the commons: File:MediaWiki database schema latest.svg redirect.

Layout
This is a description of the annotations and composition we use to visualise the relationships between tables.

Diffs

 * 1.17 > 1.19: http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/maintenance/tables.sql?r1=102798&r2=83137
 * 1.19 > 1.20: https://git.wikimedia.org/blobdiff/mediawiki%2Fcore.git/f0ee7f9b4a1d091a57ef236c6550b4ab7549731f/maintenance%2Ftables.sql?hb=bf4fb5ee9ea251512e736be36d9d6bca271c58d4