kissarat

drupal.comment.schema.json

Feb 8th, 2015
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. {
  2.     "comment": {
  3.         "description": "Stores comments and associated data.",
  4.         "fields": {
  5.             "cid": {
  6.                 "type": "serial",
  7.                 "not null": true,
  8.                 "description": "Primary Key: Unique comment ID."
  9.             },
  10.             "pid": {
  11.                 "type": "int",
  12.                 "not null": true,
  13.                 "default": 0,
  14.                 "description": "The {comment}.cid to which this comment is a reply. If set to 0, this comment is not a reply to an existing comment."
  15.             },
  16.             "nid": {
  17.                 "type": "int",
  18.                 "not null": true,
  19.                 "default": 0,
  20.                 "description": "The {node}.nid to which this comment is a reply."
  21.             },
  22.             "uid": {
  23.                 "type": "int",
  24.                 "not null": true,
  25.                 "default": 0,
  26.                 "description": "The {users}.uid who authored the comment. If set to 0, this comment was created by an anonymous user."
  27.             },
  28.             "subject": {
  29.                 "type": "varchar",
  30.                 "length": 64,
  31.                 "not null": true,
  32.                 "default": "",
  33.                 "description": "The comment title."
  34.             },
  35.             "hostname": {
  36.                 "type": "varchar",
  37.                 "length": 128,
  38.                 "not null": true,
  39.                 "default": "",
  40.                 "description": "The author's host name."
  41.             },
  42.             "created": {
  43.                 "type": "int",
  44.                 "not null": true,
  45.                 "default": 0,
  46.                 "description": "The time that the comment was created, as a Unix timestamp."
  47.             },
  48.             "changed": {
  49.                 "type": "int",
  50.                 "not null": true,
  51.                 "default": 0,
  52.                 "description": "The time that the comment was last edited, as a Unix timestamp."
  53.             },
  54.             "status": {
  55.                 "type": "int",
  56.                 "unsigned": true,
  57.                 "not null": true,
  58.                 "default": 1,
  59.                 "size": "tiny",
  60.                 "description": "The published status of a comment. (0 = Not Published, 1 = Published)"
  61.             },
  62.             "thread": {
  63.                 "type": "varchar",
  64.                 "length": 255,
  65.                 "not null": true,
  66.                 "description": "The vancode representation of the comment's place in a thread."
  67.             },
  68.             "name": {
  69.                 "type": "varchar",
  70.                 "length": 60,
  71.                 "not null": false,
  72.                 "description": "The comment author's name. Uses {users}.name if the user is logged in, otherwise uses the value typed into the comment form."
  73.             },
  74.             "mail": {
  75.                 "type": "varchar",
  76.                 "length": 64,
  77.                 "not null": false,
  78.                 "description": "The comment author's e-mail address from the comment form, if user is anonymous, and the 'Anonymous users may\/must leave their contact information' setting is turned on."
  79.             },
  80.             "homepage": {
  81.                 "type": "varchar",
  82.                 "length": 255,
  83.                 "not null": false,
  84.                 "description": "The comment author's home page address from the comment form, if user is anonymous, and the 'Anonymous users may\/must leave their contact information' setting is turned on."
  85.             },
  86.             "language": {
  87.                 "description": "The {languages}.language of this comment.",
  88.                 "type": "varchar",
  89.                 "length": 12,
  90.                 "not null": true,
  91.                 "default": ""
  92.             }
  93.         },
  94.         "indexes": {
  95.             "comment_status_pid": [
  96.                 "pid",
  97.                 "status"
  98.             ],
  99.             "comment_num_new": [
  100.                 "nid",
  101.                 "status",
  102.                 "created",
  103.                 "cid",
  104.                 "thread"
  105.             ],
  106.             "comment_uid": [
  107.                 "uid"
  108.             ],
  109.             "comment_nid_language": [
  110.                 "nid",
  111.                 "language"
  112.             ],
  113.             "comment_created": [
  114.                 "created"
  115.             ]
  116.         },
  117.         "primary key": [
  118.             "cid"
  119.         ],
  120.         "foreign keys": {
  121.             "comment_node": {
  122.                 "table": "node",
  123.                 "columns": {
  124.                     "nid": "nid"
  125.                 }
  126.             },
  127.             "comment_author": {
  128.                 "table": "users",
  129.                 "columns": {
  130.                     "uid": "uid"
  131.                 }
  132.             }
  133.         }
  134.     },
  135.     "node_comment_statistics": {
  136.         "description": "Maintains statistics of node and comments posts to show \"new\" and \"updated\" flags.",
  137.         "fields": {
  138.             "nid": {
  139.                 "type": "int",
  140.                 "unsigned": true,
  141.                 "not null": true,
  142.                 "default": 0,
  143.                 "description": "The {node}.nid for which the statistics are compiled."
  144.             },
  145.             "cid": {
  146.                 "type": "int",
  147.                 "not null": true,
  148.                 "default": 0,
  149.                 "description": "The {comment}.cid of the last comment."
  150.             },
  151.             "last_comment_timestamp": {
  152.                 "type": "int",
  153.                 "not null": true,
  154.                 "default": 0,
  155.                 "description": "The Unix timestamp of the last comment that was posted within this node, from {comment}.changed."
  156.             },
  157.             "last_comment_name": {
  158.                 "type": "varchar",
  159.                 "length": 60,
  160.                 "not null": false,
  161.                 "description": "The name of the latest author to post a comment on this node, from {comment}.name."
  162.             },
  163.             "last_comment_uid": {
  164.                 "type": "int",
  165.                 "not null": true,
  166.                 "default": 0,
  167.                 "description": "The user ID of the latest author to post a comment on this node, from {comment}.uid."
  168.             },
  169.             "comment_count": {
  170.                 "type": "int",
  171.                 "unsigned": true,
  172.                 "not null": true,
  173.                 "default": 0,
  174.                 "description": "The total number of comments on this node."
  175.             }
  176.         },
  177.         "primary key": [
  178.             "nid"
  179.         ],
  180.         "indexes": {
  181.             "node_comment_timestamp": [
  182.                 "last_comment_timestamp"
  183.             ],
  184.             "comment_count": [
  185.                 "comment_count"
  186.             ],
  187.             "last_comment_uid": [
  188.                 "last_comment_uid"
  189.             ]
  190.         },
  191.         "foreign keys": {
  192.             "statistics_node": {
  193.                 "table": "node",
  194.                 "columns": {
  195.                     "nid": "nid"
  196.                 }
  197.             },
  198.             "last_comment_author": {
  199.                 "table": "users",
  200.                 "columns": {
  201.                     "last_comment_uid": "uid"
  202.                 }
  203.             }
  204.         }
  205.     }
  206. }
Advertisement
Add Comment
Please, Sign In to add comment