webmaster@1: t('The base table for nodes.'), webmaster@1: 'fields' => array( webmaster@1: 'nid' => array( webmaster@1: 'description' => t('The primary identifier for a node.'), webmaster@1: 'type' => 'serial', webmaster@1: 'unsigned' => TRUE, webmaster@1: 'not null' => TRUE), webmaster@1: 'vid' => array( webmaster@1: 'description' => t('The current {node_revisions}.vid version identifier.'), webmaster@1: 'type' => 'int', webmaster@1: 'unsigned' => TRUE, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0), webmaster@1: 'type' => array( webmaster@1: 'description' => t('The {node_type}.type of this node.'), webmaster@1: 'type' => 'varchar', webmaster@1: 'length' => 32, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => ''), webmaster@1: 'language' => array( webmaster@1: 'description' => t('The {languages}.language of this node.'), webmaster@1: 'type' => 'varchar', webmaster@1: 'length' => 12, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => ''), webmaster@1: 'title' => array( webmaster@1: 'description' => t('The title of this node, always treated a non-markup plain text.'), webmaster@1: 'type' => 'varchar', webmaster@1: 'length' => 255, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => ''), webmaster@1: 'uid' => array( webmaster@1: 'description' => t('The {users}.uid that owns this node; initially, this is the user that created it.'), webmaster@1: 'type' => 'int', webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0), webmaster@1: 'status' => array( webmaster@1: 'description' => t('Boolean indicating whether the node is published (visible to non-administrators).'), webmaster@1: 'type' => 'int', webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 1), webmaster@1: 'created' => array( webmaster@1: 'description' => t('The Unix timestamp when the node was created.'), webmaster@1: 'type' => 'int', webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0), webmaster@1: 'changed' => array( webmaster@1: 'description' => t('The Unix timestamp when the node was most recently saved.'), webmaster@1: 'type' => 'int', webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0), webmaster@1: 'comment' => array( webmaster@1: 'description' => t('Whether comments are allowed on this node: 0 = no, 1 = read only, 2 = read/write.'), webmaster@1: 'type' => 'int', webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0), webmaster@1: 'promote' => array( webmaster@1: 'description' => t('Boolean indicating whether the node should displayed on the front page.'), webmaster@1: 'type' => 'int', webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0), webmaster@1: 'moderate' => array( webmaster@1: 'description' => t('Previously, a boolean indicating whether the node was "in moderation"; mostly no longer used.'), webmaster@1: 'type' => 'int', webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0), webmaster@1: 'sticky' => array( webmaster@1: 'description' => t('Boolean indicating whether the node should be displayed at the top of lists in which it appears.'), webmaster@1: 'type' => 'int', webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0), webmaster@1: 'tnid' => array( webmaster@1: 'description' => t('The translation set id for this node, which equals the node id of the source post in each set.'), webmaster@1: 'type' => 'int', webmaster@1: 'unsigned' => TRUE, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0), webmaster@1: 'translate' => array( webmaster@1: 'description' => t('A boolean indicating whether this translation page needs to be updated.'), webmaster@1: 'type' => 'int', webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0), webmaster@1: ), webmaster@1: 'indexes' => array( webmaster@1: 'node_changed' => array('changed'), webmaster@1: 'node_created' => array('created'), webmaster@1: 'node_moderate' => array('moderate'), webmaster@1: 'node_promote_status' => array('promote', 'status'), webmaster@1: 'node_status_type' => array('status', 'type', 'nid'), webmaster@1: 'node_title_type' => array('title', array('type', 4)), webmaster@1: 'node_type' => array(array('type', 4)), webmaster@1: 'uid' => array('uid'), webmaster@1: 'tnid' => array('tnid'), webmaster@1: 'translate' => array('translate'), webmaster@1: ), webmaster@1: 'unique keys' => array( webmaster@1: 'vid' => array('vid') webmaster@1: ), webmaster@1: 'primary key' => array('nid'), webmaster@1: ); webmaster@1: webmaster@1: $schema['node_access'] = array( webmaster@1: 'description' => t('Identifies which realm/grant pairs a user must possess in order to view, update, or delete specific nodes.'), webmaster@1: 'fields' => array( webmaster@1: 'nid' => array( webmaster@1: 'description' => t('The {node}.nid this record affects.'), webmaster@1: 'type' => 'int', webmaster@1: 'unsigned' => TRUE, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0), webmaster@1: 'gid' => array( webmaster@1: 'description' => t("The grant ID a user must possess in the specified realm to gain this row's privileges on the node."), webmaster@1: 'type' => 'int', webmaster@1: 'unsigned' => TRUE, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0), webmaster@1: 'realm' => array( webmaster@1: 'description' => t('The realm in which the user must possess the grant ID. Each node access node can define one or more realms.'), webmaster@1: 'type' => 'varchar', webmaster@1: 'length' => 255, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => ''), webmaster@1: 'grant_view' => array( webmaster@1: 'description' => t('Boolean indicating whether a user with the realm/grant pair can view this node.'), webmaster@1: 'type' => 'int', webmaster@1: 'unsigned' => TRUE, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0, webmaster@1: 'size' => 'tiny'), webmaster@1: 'grant_update' => array( webmaster@1: 'description' => t('Boolean indicating whether a user with the realm/grant pair can edit this node.'), webmaster@1: 'type' => 'int', webmaster@1: 'unsigned' => TRUE, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0, webmaster@1: 'size' => 'tiny'), webmaster@1: 'grant_delete' => array( webmaster@1: 'description' => t('Boolean indicating whether a user with the realm/grant pair can delete this node.'), webmaster@1: 'type' => 'int', webmaster@1: 'unsigned' => TRUE, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0, webmaster@1: 'size' => 'tiny') webmaster@1: ), webmaster@1: 'primary key' => array('nid', 'gid', 'realm'), webmaster@1: ); webmaster@1: webmaster@1: $schema['node_counter'] = array( webmaster@1: 'description' => t('Access statistics for {node}s.'), webmaster@1: 'fields' => array( webmaster@1: 'nid' => array( webmaster@1: 'description' => t('The {node}.nid for these statistics.'), webmaster@1: 'type' => 'int', webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0), webmaster@1: 'totalcount' => array( webmaster@1: 'description' => t('The total number of times the {node} has been viewed.'), webmaster@1: 'type' => 'int', webmaster@1: 'unsigned' => TRUE, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0, webmaster@1: 'size' => 'big'), webmaster@1: 'daycount' => array( webmaster@1: 'description' => t('The total number of times the {node} has been viewed today.'), webmaster@1: 'type' => 'int', webmaster@1: 'unsigned' => TRUE, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0, webmaster@1: 'size' => 'medium'), webmaster@1: 'timestamp' => array( webmaster@1: 'description' => t('The most recent time the {node} has been viewed.'), webmaster@1: 'type' => 'int', webmaster@1: 'unsigned' => TRUE, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0) webmaster@1: ), webmaster@1: 'primary key' => array('nid'), webmaster@1: ); webmaster@1: webmaster@1: $schema['node_revisions'] = array( webmaster@1: 'description' => t('Stores information about each saved version of a {node}.'), webmaster@1: 'fields' => array( webmaster@1: 'nid' => array( webmaster@1: 'description' => t('The {node} this version belongs to.'), webmaster@1: 'type' => 'int', webmaster@1: 'unsigned' => TRUE, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0), webmaster@1: 'vid' => array( webmaster@1: 'description' => t('The primary identifier for this version.'), webmaster@1: 'type' => 'serial', webmaster@1: 'unsigned' => TRUE, webmaster@1: 'not null' => TRUE), webmaster@1: 'uid' => array( webmaster@1: 'description' => t('The {users}.uid that created this version.'), webmaster@1: 'type' => 'int', webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0), webmaster@1: 'title' => array( webmaster@1: 'description' => t('The title of this version.'), webmaster@1: 'type' => 'varchar', webmaster@1: 'length' => 255, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => ''), webmaster@1: 'body' => array( webmaster@1: 'description' => t('The body of this version.'), webmaster@1: 'type' => 'text', webmaster@1: 'not null' => TRUE, webmaster@1: 'size' => 'big'), webmaster@1: 'teaser' => array( webmaster@1: 'description' => t('The teaser of this version.'), webmaster@1: 'type' => 'text', webmaster@1: 'not null' => TRUE, webmaster@1: 'size' => 'big'), webmaster@1: 'log' => array( webmaster@1: 'description' => t('The log entry explaining the changes in this version.'), webmaster@1: 'type' => 'text', webmaster@1: 'not null' => TRUE, webmaster@1: 'size' => 'big'), webmaster@1: 'timestamp' => array( webmaster@1: 'description' => t('A Unix timestamp indicating when this version was created.'), webmaster@1: 'type' => 'int', webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0), webmaster@1: 'format' => array( webmaster@1: 'description' => t("The input format used by this version's body."), webmaster@1: 'type' => 'int', webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0) webmaster@1: ), webmaster@1: 'indexes' => array( webmaster@1: 'nid' => array('nid'), webmaster@1: 'uid' => array('uid') webmaster@1: ), webmaster@1: 'primary key' => array('vid'), webmaster@1: ); webmaster@1: webmaster@1: $schema['node_type'] = array( webmaster@1: 'description' => t('Stores information about all defined {node} types.'), webmaster@1: 'fields' => array( webmaster@1: 'type' => array( webmaster@1: 'description' => t('The machine-readable name of this type.'), webmaster@1: 'type' => 'varchar', webmaster@1: 'length' => 32, webmaster@1: 'not null' => TRUE), webmaster@1: 'name' => array( webmaster@1: 'description' => t('The human-readable name of this type.'), webmaster@1: 'type' => 'varchar', webmaster@1: 'length' => 255, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => ''), webmaster@1: 'module' => array( webmaster@1: 'description' => t('The module that implements this type.'), webmaster@1: 'type' => 'varchar', webmaster@1: 'length' => 255, webmaster@1: 'not null' => TRUE), webmaster@1: 'description' => array( webmaster@1: 'description' => t('A brief description of this type.'), webmaster@1: 'type' => 'text', webmaster@1: 'not null' => TRUE, webmaster@1: 'size' => 'medium'), webmaster@1: 'help' => array( webmaster@1: 'description' => t('Help information shown to the user when creating a {node} of this type.'), webmaster@1: 'type' => 'text', webmaster@1: 'not null' => TRUE, webmaster@1: 'size' => 'medium'), webmaster@1: 'has_title' => array( webmaster@1: 'description' => t('Boolean indicating whether this type uses the {node}.title field.'), webmaster@1: 'type' => 'int', webmaster@1: 'unsigned' => TRUE, webmaster@1: 'not null' => TRUE, webmaster@1: 'size' => 'tiny'), webmaster@1: 'title_label' => array( webmaster@1: 'description' => t('The label displayed for the title field on the edit form.'), webmaster@1: 'type' => 'varchar', webmaster@1: 'length' => 255, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => ''), webmaster@1: 'has_body' => array( webmaster@1: 'description' => t('Boolean indicating whether this type uses the {node_revisions}.body field.'), webmaster@1: 'type' => 'int', webmaster@1: 'unsigned' => TRUE, webmaster@1: 'not null' => TRUE, webmaster@1: 'size' => 'tiny'), webmaster@1: 'body_label' => array( webmaster@1: 'description' => t('The label displayed for the body field on the edit form.'), webmaster@1: 'type' => 'varchar', webmaster@1: 'length' => 255, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => ''), webmaster@1: 'min_word_count' => array( webmaster@1: 'description' => t('The minimum number of words the body must contain.'), webmaster@1: 'type' => 'int', webmaster@1: 'unsigned' => TRUE, webmaster@1: 'not null' => TRUE, webmaster@1: 'size' => 'small'), webmaster@1: 'custom' => array( webmaster@1: 'description' => t('A boolean indicating whether this type is defined by a module (FALSE) or by a user via a module like the Content Construction Kit (TRUE).'), webmaster@1: 'type' => 'int', webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0, webmaster@1: 'size' => 'tiny'), webmaster@1: 'modified' => array( webmaster@1: 'description' => t('A boolean indicating whether this type has been modified by an administrator; currently not used in any way.'), webmaster@1: 'type' => 'int', webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0, webmaster@1: 'size' => 'tiny'), webmaster@1: 'locked' => array( webmaster@1: 'description' => t('A boolean indicating whether the administrator can change the machine name of this type.'), webmaster@1: 'type' => 'int', webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => 0, webmaster@1: 'size' => 'tiny'), webmaster@1: 'orig_type' => array( webmaster@1: 'description' => t('The original machine-readable name of this node type. This may be different from the current type name if the locked field is 0.'), webmaster@1: 'type' => 'varchar', webmaster@1: 'length' => 255, webmaster@1: 'not null' => TRUE, webmaster@1: 'default' => '') webmaster@1: ), webmaster@1: 'primary key' => array('type'), webmaster@1: ); webmaster@1: webmaster@1: return $schema; webmaster@1: } webmaster@1: