Page MenuHomePhabricator

Update diagram of core database tables to MediaWiki 1.24
Closed, ResolvedPublic


The database layout documentation includes a 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.

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
  • Maybe link directly to the SVG file in 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 an external repo.

Event Timeline

Spage raised the priority of this task from to Low.
Spage updated the task description. (Show Details)
Spage added subscribers: Spage, Krinkle, Springle.
Spage renamed this task from udpate diagram of core database tables to update diagram of core database tables.Mar 7 2015, 4:22 AM
Spage set Security to None.

Seems this could be a good GSOC/Outreachy project (has a definite deliverable and opportunity to go beyond), and I'm willing to mentor it. @Krinkle, what do you think?

@Spage doesn't it seem quite small for a 3 month project?

In any case this task would not be in the context of GSoC, since it is not about writing reusable code. It would still fit in Outreachy if it has enough beef for it. The question is: would this project take 2-3 weeks of work of an experienced contributor?

In T91859#1117021, @NiharikaKohli wrote:

@Spage, comments needed.

Sorry, I can't estimate the amount of work this would take without actually doing it! Only Krinkle knows.

Okay. Ping @Krinkle. Will this project take an experienced contributor about 2-3 weeks of work? If yes, would you like to co-mentor? If no, is there something we can club this with to make it big enough?

It took me about half a day to do (while doing other stuff meanwhile).

MySQL Workbench has the ability to import the sql schema file (which is awesome) however it does not have the ability to update the schema. Once it converts it into diagrams the conversion is done.

If a plain import resulted in a nice diagram then that lack of updatability wouldn't be an issue. However, since we add labels, descriptions and lines. And since we add groupings of tables that relate to each other, that composition has to be re-done every time.

Except when the number of changes is very small (e.g. I can diff the table.sql file between the previous version and the current one and know exactly what fields to add where and how) in which case I would copy the old diagram file and edit that (manually applying the changes).

I can do it again for MediaWiki 1.24, but would very much like for someone else to do it next time to ensure everything is documented and any pain points highlighted.

I'm hoping for the medium/long term we can find or build a Tool Labs tool (move to later) that does it automatically. E.g. we'd put our table-groups, labels and additional connections in some machine-readable format and the tool would take the schema and those annotations and build the visualisation.

Krinkle renamed this task from update diagram of core database tables to Update diagram of core database tables to MediaWiki 1.24.Mar 14 2015, 11:39 PM
Krinkle closed this task as Resolved.
Krinkle claimed this task.