Ferreteria/sql/tf leaf: Difference between revisions
< Ferreteria | sql
Jump to navigation
Jump to search
(Created page with "==About== * '''Purpose''': Index to all node ({{l/ferreteria/table|tf_node}}) leafs, regardless of format * '''Module''': {{l/ferreteria/module|TextFerret}} ==Fields== * '''Ty...") |
m (3 revisions imported: moving this project here) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 7: | Line 7: | ||
* '''2017-08-03''' Started, because the need became apparent. | * '''2017-08-03''' Started, because the need became apparent. | ||
==SQL== | ==SQL== | ||
<mysql>CREATE TABLE `tf_leaf` ( | <syntaxhighlight lang=mysql>CREATE TABLE `tf_leaf` ( | ||
`ID` INT(4) NOT NULL AUTO_INCREMENT, | `ID` INT(4) NOT NULL AUTO_INCREMENT, | ||
`ID_Node` INT(4) NOT NULL COMMENT "ID of node to which this value belongs", | `ID_Node` INT(4) NOT NULL COMMENT "ID of node to which this value belongs", | ||
`Name` VARCHAR(255) NOT NULL COMMENT "internal name of this value", | `Name` VARCHAR(255) NOT NULL COMMENT "internal name of this value", | ||
`Type` VARCHAR(255) NOT NULL COMMENT "name of type", | `Type` VARCHAR(255) NOT NULL COMMENT "name of leaf (field) type", | ||
PRIMARY KEY(`ID`), | PRIMARY KEY(`ID`), | ||
UNIQUE KEY(`ID_Node`,`Name`) | UNIQUE KEY(`ID_Node`,`Name`) | ||
) ENGINE=InnoDB;</ | ) ENGINE=InnoDB;</syntaxhighlight> |
Latest revision as of 16:42, 22 May 2022
About
- Purpose: Index to all node (Template:L/ferreteria/table) leafs, regardless of format
- Module: Template:L/ferreteria/module
Fields
- Type: name of type; in code, this should refer to an index of leaf-handler-classes
History
- 2017-08-03 Started, because the need became apparent.
SQL
CREATE TABLE `tf_leaf` (
`ID` INT(4) NOT NULL AUTO_INCREMENT,
`ID_Node` INT(4) NOT NULL COMMENT "ID of node to which this value belongs",
`Name` VARCHAR(255) NOT NULL COMMENT "internal name of this value",
`Type` VARCHAR(255) NOT NULL COMMENT "name of leaf (field) type",
PRIMARY KEY(`ID`),
UNIQUE KEY(`ID_Node`,`Name`)
) ENGINE=InnoDB;