Add separate database table for LaTeXML (step 1)

Currently the PNG and the LaTeXML rendering mode
use a common table in the database. If both rendering
modes are allowed in a wiki simultaneously this causes
problems, because the fields are continuously overwritten.

This change adds a new table for the LaTeXML rendering mode
to the database.

Bug: 65522
Change-Id: If5b887e908f22248789d478c34b03ea3c7da393a
This commit is contained in:
physikerwelt 2014-05-20 09:37:23 +00:00 committed by Physikerwelt
parent bfcb091940
commit d93fdf9141
3 changed files with 54 additions and 0 deletions

18
db/mathlatexml.mysql.sql Normal file
View File

@ -0,0 +1,18 @@
--
-- 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*/;

18
db/mathlatexml.pg.sql Normal file
View File

@ -0,0 +1,18 @@
--
-- 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 BYTEA 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 SMALLINT
) /*$wgDBTableOptions*/;

View File

@ -0,0 +1,18 @@
--
-- 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*/;