Extension:Math/mathlatexml table

From MediaWiki.org
Jump to: navigation, search

The following script is used to generate the mathlatexml table

--
-- Used by the math module to keep track
-- of previously-rendered items.
--
CREATE TABLE /*_*/mathlatexml (
  -- Binary MD5 hash of math_inputtex, used as an identifier key.
  math_inputhash varbinary(16) NOT NULL PRIMARY KEY,
  -- the user input
  math_inputtex text NOT NULL,
  -- the validated tex
  math_tex text,
  -- MathML output LaTeXML
  math_mathml text,
  -- SVG output mathoid
  math_svg text,
  -- MW_MATHSTYLE_(INLINE_DISPLAYSTYLE|DISPLAY|INLINE)
  math_style tinyint
) /*$wgDBTableOptions*/;

This generates the following table

mysql> describe mathlatexml;
+----------------+---------------+------+-----+---------+-------+
| Field          | Type          | Null | Key | Default | Extra |
+----------------+---------------+------+-----+---------+-------+
| math_inputhash | varbinary(16) | NO   | PRI | NULL    |       |
| math_inputtex  | blob          | NO   |     | NULL    |       |
| math_tex       | blob          | YES  |     | NULL    |       |
| math_mathml    | blob          | YES  |     | NULL    |       |
| math_svg       | blob          | YES  |     | NULL    |       |
| math_style     | tinyint(4)    | YES  |     | NULL    |       |
+----------------+---------------+------+-----+---------+-------+