Ferreteria/v0.41/sql/node: Difference between revisions

From Woozle Writes Code
Jump to navigation Jump to search
(Created page with "==About== * '''table purpose''': root for all data * '''record purpose''': a thing that has values * '''Module''': {{l/version|odata}} * '''History''': ** '''2017-03-12''' sta...")
 
No edit summary
Line 7: Line 7:
** '''2017-04-09''' decided there really should be a WhenMade timestamp; can always remove later
** '''2017-04-09''' decided there really should be a WhenMade timestamp; can always remove later
** '''2017-08-05''' renamed '''Class''' to '''Type''' for consistency with tf_leaf: records use "types", code maps these to "classes"
** '''2017-08-05''' renamed '''Class''' to '''Type''' for consistency with tf_leaf: records use "types", code maps these to "classes"
** '''2020-01-16''' redesigning for v0.4
** '''2020-01-16''' redesigning for v0.4 (copied from [[Ferreteria/sql/tf node]])
==Fields==
==Fields==
* '''Type''': name of node type; code should know how to map these to node-handler classes
* '''Type''': name of node type; code should know how to map these to node-handler classes

Revision as of 22:53, 16 January 2020

About

  • table purpose: root for all data
  • record purpose: a thing that has values
  • Module: Template:L/version
  • History:
    • 2017-03-12 started
    • 2017-04-09 decided there really should be a WhenMade timestamp; can always remove later
    • 2017-08-05 renamed Class to Type for consistency with tf_leaf: records use "types", code maps these to "classes"
    • 2020-01-16 redesigning for v0.4 (copied from Ferreteria/sql/tf node)

Fields

  • Type: name of node type; code should know how to map these to node-handler classes

SQL

CREATE TABLE `node` (
  `ID`       INT(4)       NOT NULL AUTO_INCREMENT,
  `Type`     VARCHAR(255) NOT NULL COMMENT "name of node type",
  `WhenMade` DATETIME     NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY(`ID`)
) ENGINE=InnoDB;