Add separate database tables for Mathoid
Add the tables needed for Mathoid. Bug: 65793 Change-Id: Ia8dcb11234dffb7bce67f9ca0e7ebf1279fd7620
This commit is contained in:
parent
1de09cd270
commit
3cbb5225e3
|
@ -229,6 +229,14 @@ class MathHooks {
|
||||||
throw new MWException( "Math extension does not currently support $type database for LaTeXML." );
|
throw new MWException( "Math extension does not currently support $type database for LaTeXML." );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ( in_array( MW_MATH_MATHML, $wgMathValidModes ) ) {
|
||||||
|
if ( in_array( $type, array( 'mysql', 'sqlite', 'postgres' ) ) ) {
|
||||||
|
$sql = dirname( __FILE__ ) . '/db/mathoid.' . $type . '.sql';
|
||||||
|
$updater->addExtensionTable( 'mathoid', $sql );
|
||||||
|
} else {
|
||||||
|
throw new MWException( "Math extension does not currently support $type database for Mathoid." );
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new MWException( "Math extension does not currently support $type database." );
|
throw new MWException( "Math extension does not currently support $type database." );
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
--
|
||||||
|
-- Used by the math module to keep track
|
||||||
|
-- of previously-rendered items.
|
||||||
|
--
|
||||||
|
CREATE TABLE /*_*/mathoid (
|
||||||
|
-- Binary MD5 hash of math_inputtex, used as an identifier key.
|
||||||
|
math_inputhash varbinary(16) NOT NULL PRIMARY KEY,
|
||||||
|
-- the user input
|
||||||
|
math_input 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,
|
||||||
|
-- type of the Math input (TeX, MathML, AsciiMath...)
|
||||||
|
math_input_type tinyint
|
||||||
|
) /*$wgDBTableOptions*/;
|
|
@ -0,0 +1,20 @@
|
||||||
|
--
|
||||||
|
-- Used by the math module to keep track
|
||||||
|
-- of previously-rendered items.
|
||||||
|
--
|
||||||
|
CREATE TABLE /*_*/mathoid (
|
||||||
|
-- Binary MD5 hash of math_inputtex, used as an identifier key.
|
||||||
|
math_inputhash BYTEA PRIMARY KEY,
|
||||||
|
-- the user input
|
||||||
|
math_input 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,
|
||||||
|
-- type of the Math input (TeX, MathML, AsciiMath...)
|
||||||
|
math_input_type SMALLINT
|
||||||
|
) /*$wgDBTableOptions*/;
|
|
@ -0,0 +1,20 @@
|
||||||
|
--
|
||||||
|
-- Used by the math module to keep track
|
||||||
|
-- of previously-rendered items.
|
||||||
|
--
|
||||||
|
CREATE TABLE /*_*/mathoid (
|
||||||
|
-- Binary MD5 hash of math_inputtex, used as an identifier key.
|
||||||
|
math_inputhash varbinary(16) NOT NULL PRIMARY KEY,
|
||||||
|
-- the user input
|
||||||
|
math_input 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,
|
||||||
|
-- type of the Math input (TeX, MathML, AsciiMath...)
|
||||||
|
math_input_type tinyint
|
||||||
|
) /*$wgDBTableOptions*/;
|
Loading…
Reference in New Issue