Module:SchemaDiagram/doc

Usage

edit

User

  • user_id INT
  • user_name VARCHAR(255)
  • user_real_name VARCHAR(255)
  • user_password TINYBLOB
  • user_newpassword TINYBLOB
  • user_newpass_time BINARY(14)
  • user_email TINYTEXT
  • user_touched BINARY(14)
  • user_token BINARY(32)
  • user_email_authenticated BINARY(14)
  • user_email_token BINARY(32)
  • user_email_token_expires BINARY(14)
  • user_registration BINARY(14)
  • user_editcount INT
  • user_password_expires VARBINARY(14)
  • up_user INT
  • up_property VARBINARY(255)
  • up_value BLOB
  • user_id INT
  • user_ip VARBINARY(40)
  • user_last_timestamp VARBINARY(14)
{{#invoke:SchemaDiagram|render|
|layout= [
  { "title": "User",
    "color": "#C5E8B4",
    "tables": [
      [ "user" ],
      [ "user_properties", "user_newtalk" ]
    ]
  }
]
|sql_page=SchemaDiagram/sql/mediawiki-1.34.0.txt
}}

Parameters

edit
caption
(Optional) Some wikitext to render above the diagram in a yellow caption.
layout
(Required) JSON structure that describes the database table groups (see below).
sql_page or sql
(Required) SQL "CREATE TABLE" syntax. Can either be the title of a page that contains it (e.g. Template:SchemaDiagram/sql/…), or a literal string.

Layout

edit

The layout JSON structure is an array of objects, where each object describes a group of one or more database tables.

Each group object requires the following properties:

title
Name of the group to display.
color
CSS color value, to use as background color (using light pastel colors is the convention).
tables
An array of arrays of table names. The first level are columns.

See also

edit