- Patch #214271 by recidive: improved schema identation.
parent
637ec9359c
commit
f5d4287cd5
modules
aggregator
block
comment
dblog
filter
forum
node
poll
profile
search
system
user
|
@ -56,7 +56,9 @@ function aggregator_schema() {
|
|||
)
|
||||
),
|
||||
'primary key' => array('cid'),
|
||||
'unique keys' => array('title' => array('title')),
|
||||
'unique keys' => array(
|
||||
'title' => array('title'),
|
||||
),
|
||||
);
|
||||
|
||||
$schema['aggregator_category_feed'] = array(
|
||||
|
@ -76,7 +78,9 @@ function aggregator_schema() {
|
|||
)
|
||||
),
|
||||
'primary key' => array('cid', 'fid'),
|
||||
'indexes' => array('fid' => array('fid')),
|
||||
'indexes' => array(
|
||||
'fid' => array('fid'),
|
||||
),
|
||||
);
|
||||
|
||||
$schema['aggregator_category_item'] = array(
|
||||
|
@ -96,7 +100,9 @@ function aggregator_schema() {
|
|||
)
|
||||
),
|
||||
'primary key' => array('cid', 'iid'),
|
||||
'indexes' => array('iid' => array('iid')),
|
||||
'indexes' => array(
|
||||
'iid' => array('iid'),
|
||||
),
|
||||
);
|
||||
|
||||
$schema['aggregator_feed'] = array(
|
||||
|
@ -234,7 +240,9 @@ function aggregator_schema() {
|
|||
)
|
||||
),
|
||||
'primary key' => array('iid'),
|
||||
'indexes' => array('fid' => array('fid')),
|
||||
'indexes' => array(
|
||||
'fid' => array('fid'),
|
||||
),
|
||||
);
|
||||
|
||||
return $schema;
|
||||
|
|
|
@ -114,7 +114,7 @@ function block_schema() {
|
|||
'not null' => TRUE,
|
||||
'description' => t("The block's origin module, from {blocks}.module."),
|
||||
),
|
||||
'delta' => array(
|
||||
'delta' => array(
|
||||
'type' => 'varchar',
|
||||
'length' => 32,
|
||||
'not null' => TRUE,
|
||||
|
@ -127,11 +127,7 @@ function block_schema() {
|
|||
'description' => t("The user's role ID from {users_roles}.rid."),
|
||||
),
|
||||
),
|
||||
'primary key' => array(
|
||||
'module',
|
||||
'delta',
|
||||
'rid'
|
||||
),
|
||||
'primary key' => array('module', 'delta', 'rid'),
|
||||
'indexes' => array(
|
||||
'rid' => array('rid'),
|
||||
),
|
||||
|
@ -142,7 +138,7 @@ function block_schema() {
|
|||
'fields' => array(
|
||||
'bid' => array(
|
||||
'type' => 'serial',
|
||||
'unsigned' => TRUE,
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
'description' => t("The block's {blocks}.bid."),
|
||||
),
|
||||
|
@ -167,7 +163,9 @@ function block_schema() {
|
|||
'description' => t("Block body's {filter_formats}.format; for example, 1 = Filtered HTML."),
|
||||
)
|
||||
),
|
||||
'unique keys' => array('info' => array('info')),
|
||||
'unique keys' => array(
|
||||
'info' => array('info'),
|
||||
),
|
||||
'primary key' => array('bid'),
|
||||
);
|
||||
|
||||
|
|
|
@ -165,9 +165,10 @@ function comment_schema() {
|
|||
)
|
||||
),
|
||||
'indexes' => array(
|
||||
'pid' => array('pid'),
|
||||
'nid' => array('nid'),
|
||||
'status' => array('status'), // This index is probably unused
|
||||
'pid' => array('pid'),
|
||||
'nid' => array('nid'),
|
||||
// This index is probably unused.
|
||||
'status' => array('status'),
|
||||
),
|
||||
'primary key' => array('cid'),
|
||||
);
|
||||
|
@ -210,10 +211,9 @@ function comment_schema() {
|
|||
),
|
||||
'primary key' => array('nid'),
|
||||
'indexes' => array(
|
||||
'node_comment_timestamp' => array('last_comment_timestamp')
|
||||
'node_comment_timestamp' => array('last_comment_timestamp'),
|
||||
),
|
||||
);
|
||||
|
||||
return $schema;
|
||||
}
|
||||
|
||||
|
|
|
@ -96,9 +96,10 @@ function dblog_schema() {
|
|||
),
|
||||
),
|
||||
'primary key' => array('wid'),
|
||||
'indexes' => array('type' => array('type')),
|
||||
'indexes' => array(
|
||||
'type' => array('type'),
|
||||
),
|
||||
);
|
||||
|
||||
return $schema;
|
||||
}
|
||||
|
||||
|
|
|
@ -87,7 +87,9 @@ function filter_schema() {
|
|||
)
|
||||
),
|
||||
'primary key' => array('format'),
|
||||
'unique keys' => array('name' => array('name')),
|
||||
'unique keys' => array(
|
||||
'name' => array('name'),
|
||||
),
|
||||
);
|
||||
|
||||
$schema['cache_filter'] = drupal_get_schema_unprocessed('system', 'cache');
|
||||
|
|
|
@ -92,7 +92,7 @@ function forum_schema() {
|
|||
),
|
||||
'indexes' => array(
|
||||
'nid' => array('nid'),
|
||||
'tid' => array('tid')
|
||||
'tid' => array('tid'),
|
||||
),
|
||||
'primary key' => array('vid'),
|
||||
);
|
||||
|
|
|
@ -12,83 +12,98 @@ function node_schema() {
|
|||
'description' => t('The primary identifier for a node.'),
|
||||
'type' => 'serial',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE),
|
||||
'not null' => TRUE,
|
||||
),
|
||||
'vid' => array(
|
||||
'description' => t('The current {node_revisions}.vid version identifier.'),
|
||||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'type' => array(
|
||||
'description' => t('The {node_type}.type of this node.'),
|
||||
'type' => 'varchar',
|
||||
'length' => 32,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'language' => array(
|
||||
'description' => t('The {languages}.language of this node.'),
|
||||
'type' => 'varchar',
|
||||
'length' => 12,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'title' => array(
|
||||
'description' => t('The title of this node, always treated a non-markup plain text.'),
|
||||
'type' => 'varchar',
|
||||
'length' => 255,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'uid' => array(
|
||||
'description' => t('The {users}.uid that owns this node; initially, this is the user that created it.'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'status' => array(
|
||||
'description' => t('Boolean indicating whether the node is published (visible to non-administrators).'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 1),
|
||||
'default' => 1,
|
||||
),
|
||||
'created' => array(
|
||||
'description' => t('The Unix timestamp when the node was created.'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'changed' => array(
|
||||
'description' => t('The Unix timestamp when the node was most recently saved.'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'comment' => array(
|
||||
'description' => t('Whether comments are allowed on this node: 0 = no, 1 = read only, 2 = read/write.'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'promote' => array(
|
||||
'description' => t('Boolean indicating whether the node should displayed on the front page.'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'moderate' => array(
|
||||
'description' => t('Previously, a boolean indicating whether the node was "in moderation"; mostly no longer used.'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'sticky' => array(
|
||||
'description' => t('Boolean indicating whether the node should be displayed at the top of lists in which it appears.'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'tnid' => array(
|
||||
'description' => t('The translation set id for this node, which equals the node id of the source post in each set.'),
|
||||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'translate' => array(
|
||||
'description' => t('A boolean indicating whether this translation page needs to be updated.'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
),
|
||||
'indexes' => array(
|
||||
'node_changed' => array('changed'),
|
||||
'node_created' => array('created'),
|
||||
|
@ -100,12 +115,12 @@ function node_schema() {
|
|||
'uid' => array('uid'),
|
||||
'tnid' => array('tnid'),
|
||||
'translate' => array('translate'),
|
||||
),
|
||||
),
|
||||
'unique keys' => array(
|
||||
'vid' => array('vid')
|
||||
),
|
||||
'vid' => array('vid'),
|
||||
),
|
||||
'primary key' => array('nid'),
|
||||
);
|
||||
);
|
||||
|
||||
$schema['node_access'] = array(
|
||||
'description' => t('Identifies which realm/grant pairs a user must possess in order to view, update, or delete specific nodes.'),
|
||||
|
@ -115,43 +130,49 @@ function node_schema() {
|
|||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'gid' => array(
|
||||
'description' => t("The grant ID a user must possess in the specified realm to gain this row's privileges on the node."),
|
||||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'realm' => array(
|
||||
'description' => t('The realm in which the user must possess the grant ID. Each node access node can define one or more realms.'),
|
||||
'type' => 'varchar',
|
||||
'length' => 255,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'grant_view' => array(
|
||||
'description' => t('Boolean indicating whether a user with the realm/grant pair can view this node.'),
|
||||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
'default' => 0,
|
||||
'size' => 'tiny'),
|
||||
'size' => 'tiny',
|
||||
),
|
||||
'grant_update' => array(
|
||||
'description' => t('Boolean indicating whether a user with the realm/grant pair can edit this node.'),
|
||||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
'default' => 0,
|
||||
'size' => 'tiny'),
|
||||
'size' => 'tiny',
|
||||
),
|
||||
'grant_delete' => array(
|
||||
'description' => t('Boolean indicating whether a user with the realm/grant pair can delete this node.'),
|
||||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
'default' => 0,
|
||||
'size' => 'tiny')
|
||||
'size' => 'tiny',
|
||||
),
|
||||
),
|
||||
'primary key' => array('nid', 'gid', 'realm'),
|
||||
);
|
||||
);
|
||||
|
||||
$schema['node_counter'] = array(
|
||||
'description' => t('Access statistics for {node}s.'),
|
||||
|
@ -160,30 +181,34 @@ function node_schema() {
|
|||
'description' => t('The {node}.nid for these statistics.'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'totalcount' => array(
|
||||
'description' => t('The total number of times the {node} has been viewed.'),
|
||||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
'default' => 0,
|
||||
'size' => 'big'),
|
||||
'size' => 'big',
|
||||
),
|
||||
'daycount' => array(
|
||||
'description' => t('The total number of times the {node} has been viewed today.'),
|
||||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
'default' => 0,
|
||||
'size' => 'medium'),
|
||||
'size' => 'medium',
|
||||
),
|
||||
'timestamp' => array(
|
||||
'description' => t('The most recent time the {node} has been viewed.'),
|
||||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
'default' => 0)
|
||||
'default' => 0,
|
||||
),
|
||||
),
|
||||
'primary key' => array('nid'),
|
||||
);
|
||||
);
|
||||
|
||||
$schema['node_revisions'] = array(
|
||||
'description' => t('Stores information about each saved version of a {node}.'),
|
||||
|
@ -193,55 +218,64 @@ function node_schema() {
|
|||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'vid' => array(
|
||||
'description' => t('The primary identifier for this version.'),
|
||||
'type' => 'serial',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE),
|
||||
'not null' => TRUE,
|
||||
),
|
||||
'uid' => array(
|
||||
'description' => t('The {users}.uid that created this version.'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'title' => array(
|
||||
'description' => t('The title of this version.'),
|
||||
'type' => 'varchar',
|
||||
'length' => 255,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'body' => array(
|
||||
'description' => t('The body of this version.'),
|
||||
'type' => 'text',
|
||||
'not null' => TRUE,
|
||||
'size' => 'big'),
|
||||
'size' => 'big',
|
||||
),
|
||||
'teaser' => array(
|
||||
'description' => t('The teaser of this version.'),
|
||||
'type' => 'text',
|
||||
'not null' => TRUE,
|
||||
'size' => 'big'),
|
||||
'size' => 'big',
|
||||
),
|
||||
'log' => array(
|
||||
'description' => t('The log entry explaining the changes in this version.'),
|
||||
'type' => 'text',
|
||||
'not null' => TRUE,
|
||||
'size' => 'big'),
|
||||
'size' => 'big',
|
||||
),
|
||||
'timestamp' => array(
|
||||
'description' => t('A Unix timestamp indicating when this version was created.'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'format' => array(
|
||||
'description' => t("The input format used by this version's body."),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0)
|
||||
'default' => 0,
|
||||
),
|
||||
),
|
||||
'indexes' => array(
|
||||
'nid' => array('nid'),
|
||||
'uid' => array('uid')
|
||||
),
|
||||
'uid' => array('uid'),
|
||||
),
|
||||
'primary key' => array('vid'),
|
||||
);
|
||||
);
|
||||
|
||||
$schema['node_type'] = array(
|
||||
'description' => t('Stores information about all defined {node} types.'),
|
||||
|
@ -250,86 +284,99 @@ function node_schema() {
|
|||
'description' => t('The machine-readable name of this type.'),
|
||||
'type' => 'varchar',
|
||||
'length' => 32,
|
||||
'not null' => TRUE),
|
||||
'not null' => TRUE,
|
||||
),
|
||||
'name' => array(
|
||||
'description' => t('The human-readable name of this type.'),
|
||||
'type' => 'varchar',
|
||||
'length' => 255,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'module' => array(
|
||||
'description' => t('The module that implements this type.'),
|
||||
'type' => 'varchar',
|
||||
'length' => 255,
|
||||
'not null' => TRUE),
|
||||
'description' => array(
|
||||
'not null' => TRUE,
|
||||
),
|
||||
'description' => array(
|
||||
'description' => t('A brief description of this type.'),
|
||||
'type' => 'text',
|
||||
'not null' => TRUE,
|
||||
'size' => 'medium'),
|
||||
'size' => 'medium',
|
||||
),
|
||||
'help' => array(
|
||||
'description' => t('Help information shown to the user when creating a {node} of this type.'),
|
||||
'type' => 'text',
|
||||
'not null' => TRUE,
|
||||
'size' => 'medium'),
|
||||
'size' => 'medium',
|
||||
),
|
||||
'has_title' => array(
|
||||
'description' => t('Boolean indicating whether this type uses the {node}.title field.'),
|
||||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
'size' => 'tiny'),
|
||||
'size' => 'tiny',
|
||||
),
|
||||
'title_label' => array(
|
||||
'description' => t('The label displayed for the title field on the edit form.'),
|
||||
'type' => 'varchar',
|
||||
'length' => 255,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'has_body' => array(
|
||||
'description' => t('Boolean indicating whether this type uses the {node_revisions}.body field.'),
|
||||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
'size' => 'tiny'),
|
||||
'size' => 'tiny',
|
||||
),
|
||||
'body_label' => array(
|
||||
'description' => t('The label displayed for the body field on the edit form.'),
|
||||
'type' => 'varchar',
|
||||
'length' => 255,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'min_word_count' => array(
|
||||
'description' => t('The minimum number of words the body must contain.'),
|
||||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
'size' => 'small'),
|
||||
'size' => 'small',
|
||||
),
|
||||
'custom' => array(
|
||||
'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).'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0,
|
||||
'size' => 'tiny'),
|
||||
'size' => 'tiny',
|
||||
),
|
||||
'modified' => array(
|
||||
'description' => t('A boolean indicating whether this type has been modified by an administrator; currently not used in any way.'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0,
|
||||
'size' => 'tiny'),
|
||||
'size' => 'tiny',
|
||||
),
|
||||
'locked' => array(
|
||||
'description' => t('A boolean indicating whether the administrator can change the machine name of this type.'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0,
|
||||
'size' => 'tiny'),
|
||||
'size' => 'tiny',
|
||||
),
|
||||
'orig_type' => array(
|
||||
'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.'),
|
||||
'type' => 'varchar',
|
||||
'length' => 255,
|
||||
'not null' => TRUE,
|
||||
'default' => '')
|
||||
'default' => '',
|
||||
),
|
||||
),
|
||||
'primary key' => array('type'),
|
||||
);
|
||||
);
|
||||
|
||||
return $schema;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,109 +24,108 @@ function poll_schema() {
|
|||
$schema['poll'] = array(
|
||||
'description' => t('Stores poll-specific information for poll nodes.'),
|
||||
'fields' => array(
|
||||
'nid' => array(
|
||||
'nid' => array(
|
||||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
'default' => 0,
|
||||
'description' => t("The poll's {node}.nid.")
|
||||
),
|
||||
'description' => t("The poll's {node}.nid."),
|
||||
),
|
||||
'runtime' => array(
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0,
|
||||
'description' => t('The number of seconds past {node}.created during which the poll is open.')
|
||||
),
|
||||
'active' => array(
|
||||
'description' => t('The number of seconds past {node}.created during which the poll is open.'),
|
||||
),
|
||||
'active' => array(
|
||||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
'default' => 0,
|
||||
'description' => t('Boolean indicating whether or not the poll is open.'),
|
||||
),
|
||||
),
|
||||
),
|
||||
'primary key' => array('nid'),
|
||||
);
|
||||
);
|
||||
|
||||
$schema['poll_choices'] = array(
|
||||
'description' => t('Stores information about all choices for all {poll}s.'),
|
||||
'fields' => array(
|
||||
'chid' => array(
|
||||
'chid' => array(
|
||||
'type' => 'serial',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
'description' => t('Unique identifier for a poll choice.'),
|
||||
),
|
||||
'nid' => array(
|
||||
),
|
||||
'nid' => array(
|
||||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
'default' => 0,
|
||||
'description' => t('The {node}.nid this choice belongs to.'),
|
||||
),
|
||||
'chtext' => array(
|
||||
),
|
||||
'chtext' => array(
|
||||
'type' => 'varchar',
|
||||
'length' => 128,
|
||||
'not null' => TRUE,
|
||||
'default' => '',
|
||||
'description' => t('The text for this choice.'),
|
||||
),
|
||||
),
|
||||
'chvotes' => array(
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0,
|
||||
'description' => t('The total number of votes this choice has received by all users.'),
|
||||
),
|
||||
),
|
||||
'chorder' => array(
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0,
|
||||
'description' => t('The sort order of this choice among all choices for the same node.'),
|
||||
)
|
||||
),
|
||||
),
|
||||
'indexes' => array(
|
||||
'nid' => array('nid')
|
||||
),
|
||||
'nid' => array('nid'),
|
||||
),
|
||||
'primary key' => array('chid'),
|
||||
);
|
||||
);
|
||||
|
||||
$schema['poll_votes'] = array(
|
||||
'description' => t('Stores per-{users} votes for each {poll}.'),
|
||||
'fields' => array(
|
||||
'nid' => array(
|
||||
'nid' => array(
|
||||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
'description' => t('The {poll} node this vote is for.'),
|
||||
),
|
||||
'uid' => array(
|
||||
),
|
||||
'uid' => array(
|
||||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
'default' => 0,
|
||||
'description' => t('The {users}.uid this vote is from unless the voter was anonymous.'),
|
||||
),
|
||||
'chorder' => array(
|
||||
),
|
||||
'chorder' => array(
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => -1,
|
||||
'description' => t("The {users}'s vote for this poll."),
|
||||
),
|
||||
),
|
||||
'hostname' => array(
|
||||
'type' => 'varchar',
|
||||
'length' => 128,
|
||||
'not null' => TRUE,
|
||||
'default' => '',
|
||||
'description' => t('The IP address this vote is from unless the voter was logged in.'),
|
||||
),
|
||||
),
|
||||
),
|
||||
'primary key' => array('nid', 'uid', 'hostname'),
|
||||
'indexes' => array(
|
||||
'hostname' => array('hostname'),
|
||||
'uid' => array('uid'),
|
||||
),
|
||||
);
|
||||
'uid' => array('uid'),
|
||||
),
|
||||
);
|
||||
|
||||
return $schema;
|
||||
}
|
||||
|
||||
|
|
|
@ -108,8 +108,12 @@ function profile_schema() {
|
|||
'description' => t('List of options to be used in a list selection field.'),
|
||||
),
|
||||
),
|
||||
'indexes' => array('category' => array('category')),
|
||||
'unique keys' => array('name' => array('name')),
|
||||
'indexes' => array(
|
||||
'category' => array('category'),
|
||||
),
|
||||
'unique keys' => array(
|
||||
'name' => array('name'),
|
||||
),
|
||||
'primary key' => array('fid'),
|
||||
);
|
||||
|
||||
|
@ -144,4 +148,3 @@ function profile_schema() {
|
|||
|
||||
return $schema;
|
||||
}
|
||||
|
||||
|
|
|
@ -55,7 +55,9 @@ function search_schema() {
|
|||
'description' => t('Set to force node reindexing.'),
|
||||
),
|
||||
),
|
||||
'unique keys' => array('sid_type' => array('sid', 'type')),
|
||||
'unique keys' => array(
|
||||
'sid_type' => array('sid', 'type'),
|
||||
),
|
||||
);
|
||||
|
||||
$schema['search_index'] = array(
|
||||
|
@ -89,9 +91,11 @@ function search_schema() {
|
|||
),
|
||||
'indexes' => array(
|
||||
'sid_type' => array('sid', 'type'),
|
||||
'word' => array('word')
|
||||
'word' => array('word'),
|
||||
),
|
||||
'unique keys' => array(
|
||||
'word_sid_type' => array('word', 'sid', 'type'),
|
||||
),
|
||||
'unique keys' => array('word_sid_type' => array('word', 'sid', 'type')),
|
||||
);
|
||||
|
||||
$schema['search_total'] = array(
|
||||
|
@ -145,9 +149,10 @@ function search_schema() {
|
|||
),
|
||||
),
|
||||
'primary key' => array('sid', 'type', 'nid'),
|
||||
'indexes' => array('nid' => array('nid')),
|
||||
'indexes' => array(
|
||||
'nid' => array('nid'),
|
||||
),
|
||||
);
|
||||
|
||||
return $schema;
|
||||
}
|
||||
|
||||
|
|
|
@ -421,15 +421,17 @@ function system_schema() {
|
|||
'type' => 'varchar',
|
||||
'length' => 128,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'value' => array(
|
||||
'description' => t('The value of the variable.'),
|
||||
'type' => 'text',
|
||||
'not null' => TRUE,
|
||||
'size' => 'big'),
|
||||
'size' => 'big',
|
||||
),
|
||||
),
|
||||
'primary key' => array('name'),
|
||||
);
|
||||
);
|
||||
|
||||
$schema['actions'] = array(
|
||||
'description' => t('Stores action information.'),
|
||||
|
@ -439,33 +441,38 @@ function system_schema() {
|
|||
'type' => 'varchar',
|
||||
'length' => 255,
|
||||
'not null' => TRUE,
|
||||
'default' => '0'),
|
||||
'default' => '0',
|
||||
),
|
||||
'type' => array(
|
||||
'description' => t('The object that that action acts on (node, user, comment, system or custom types.)'),
|
||||
'type' => 'varchar',
|
||||
'length' => 32,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'callback' => array(
|
||||
'description' => t('The callback function that executes when the action runs.'),
|
||||
'type' => 'varchar',
|
||||
'length' => 255,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'parameters' => array(
|
||||
'description' => t('Parameters to be passed to the callback function.'),
|
||||
'type' => 'text',
|
||||
'not null' => TRUE,
|
||||
'size' => 'big'),
|
||||
'size' => 'big',
|
||||
),
|
||||
'description' => array(
|
||||
'description' => t('Description of the action.'),
|
||||
'type' => 'varchar',
|
||||
'length' => 255,
|
||||
'not null' => TRUE,
|
||||
'default' => '0'),
|
||||
'default' => '0',
|
||||
),
|
||||
),
|
||||
'primary key' => array('aid'),
|
||||
);
|
||||
);
|
||||
|
||||
$schema['actions_aid'] = array(
|
||||
'description' => t('Stores action IDs for non-default actions.'),
|
||||
|
@ -474,10 +481,11 @@ function system_schema() {
|
|||
'description' => t('Primary Key: Unique actions ID.'),
|
||||
'type' => 'serial',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE),
|
||||
'not null' => TRUE,
|
||||
),
|
||||
),
|
||||
'primary key' => array('aid'),
|
||||
);
|
||||
);
|
||||
|
||||
$schema['batch'] = array(
|
||||
'description' => t('Stores details about batches (processes that run in multiple HTTP requests).'),
|
||||
|
@ -486,25 +494,31 @@ function system_schema() {
|
|||
'description' => t('Primary Key: Unique batch ID.'),
|
||||
'type' => 'serial',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE),
|
||||
'not null' => TRUE,
|
||||
),
|
||||
'token' => array(
|
||||
'description' => t("A string token generated against the current user's session id and the batch id, used to ensure that only the user who submitted the batch can effectively access it."),
|
||||
'type' => 'varchar',
|
||||
'length' => 64,
|
||||
'not null' => TRUE),
|
||||
'not null' => TRUE,
|
||||
),
|
||||
'timestamp' => array(
|
||||
'description' => t('A Unix timestamp indicating when this batch was submitted for processing. Stale batches are purged at cron time.'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE),
|
||||
'not null' => TRUE,
|
||||
),
|
||||
'batch' => array(
|
||||
'description' => t('A serialized array containing the processing data for the batch.'),
|
||||
'type' => 'text',
|
||||
'not null' => FALSE,
|
||||
'size' => 'big')
|
||||
'size' => 'big',
|
||||
),
|
||||
),
|
||||
'primary key' => array('bid'),
|
||||
'indexes' => array('token' => array('token')),
|
||||
);
|
||||
'indexes' => array(
|
||||
'token' => array('token'),
|
||||
),
|
||||
);
|
||||
|
||||
$schema['cache'] = array(
|
||||
'description' => t('Generic cache table for caching things not separated out into their own tables. Contributed modules may also use this to store cached items.'),
|
||||
|
@ -514,36 +528,44 @@ function system_schema() {
|
|||
'type' => 'varchar',
|
||||
'length' => 255,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'data' => array(
|
||||
'description' => t('A collection of data to cache.'),
|
||||
'type' => 'blob',
|
||||
'not null' => FALSE,
|
||||
'size' => 'big'),
|
||||
'size' => 'big',
|
||||
),
|
||||
'expire' => array(
|
||||
'description' => t('A Unix timestamp indicating when the cache entry should expire, or 0 for never.'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'created' => array(
|
||||
'description' => t('A Unix timestamp indicating when the cache entry was created.'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'headers' => array(
|
||||
'description' => t('Any custom HTTP headers to be added to cached data.'),
|
||||
'type' => 'text',
|
||||
'not null' => FALSE),
|
||||
'not null' => FALSE,
|
||||
),
|
||||
'serialized' => array(
|
||||
'description' => t('A flag to indicate whether content is serialized (1) or not (0).'),
|
||||
'type' => 'int',
|
||||
'size' => 'small',
|
||||
'not null' => TRUE,
|
||||
'default' => 0)
|
||||
'default' => 0,
|
||||
),
|
||||
'indexes' => array('expire' => array('expire')),
|
||||
),
|
||||
'indexes' => array(
|
||||
'expire' => array('expire'),
|
||||
),
|
||||
'primary key' => array('cid'),
|
||||
);
|
||||
);
|
||||
|
||||
$schema['cache_form'] = $schema['cache'];
|
||||
$schema['cache_form']['description'] = t('Cache table for the form system to store recently built forms and their storage data, to be used in subsequent page requests.');
|
||||
|
@ -559,56 +581,64 @@ function system_schema() {
|
|||
'description' => t('Primary Key: Unique files ID.'),
|
||||
'type' => 'serial',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE),
|
||||
'not null' => TRUE,
|
||||
),
|
||||
'uid' => array(
|
||||
'description' => t('The {users}.uid of the user who is associated with the file.'),
|
||||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'filename' => array(
|
||||
'description' => t('Name of the file.'),
|
||||
'type' => 'varchar',
|
||||
'length' => 255,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'filepath' => array(
|
||||
'description' => t('Path of the file relative to Drupal root.'),
|
||||
'type' => 'varchar',
|
||||
'length' => 255,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'filemime' => array(
|
||||
'description' => t('The file MIME type.'),
|
||||
'type' => 'varchar',
|
||||
'length' => 255,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'filesize' => array(
|
||||
'description' => t('The size of the file in bytes.'),
|
||||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'status' => array(
|
||||
'description' => t('A flag indicating whether file is temporary (1) or permanent (0).'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'timestamp' => array(
|
||||
'description' => t('UNIX timestamp for when the file was added.'),
|
||||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
),
|
||||
'indexes' => array(
|
||||
'uid' => array('uid'),
|
||||
'status' => array('status'),
|
||||
'timestamp' => array('timestamp'),
|
||||
),
|
||||
),
|
||||
'primary key' => array('fid'),
|
||||
);
|
||||
);
|
||||
|
||||
$schema['flood'] = array(
|
||||
'description' => t('Flood controls the threshold of events, such as the number of contact attempts.'),
|
||||
|
@ -616,30 +646,34 @@ function system_schema() {
|
|||
'fid' => array(
|
||||
'description' => t('Unique flood event ID.'),
|
||||
'type' => 'serial',
|
||||
'not null' => TRUE),
|
||||
'not null' => TRUE,
|
||||
),
|
||||
'event' => array(
|
||||
'description' => t('Name of event (e.g. contact).'),
|
||||
'type' => 'varchar',
|
||||
'length' => 64,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'hostname' => array(
|
||||
'description' => t('Hostname of the visitor.'),
|
||||
'type' => 'varchar',
|
||||
'length' => 128,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'timestamp' => array(
|
||||
'description' => t('Timestamp of the event.'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0)
|
||||
'default' => 0,
|
||||
),
|
||||
),
|
||||
'primary key' => array('fid'),
|
||||
'indexes' => array(
|
||||
'allow' => array('event', 'hostname', 'timestamp'),
|
||||
),
|
||||
);
|
||||
);
|
||||
|
||||
$schema['history'] = array(
|
||||
'description' => t('A record of which {users} have read which {node}s.'),
|
||||
|
@ -648,23 +682,26 @@ function system_schema() {
|
|||
'description' => t('The {users}.uid that read the {node} nid.'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'nid' => array(
|
||||
'description' => t('The {node}.nid that was read.'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'timestamp' => array(
|
||||
'description' => t('The Unix timestamp at which the read occurred.'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0)
|
||||
'default' => 0,
|
||||
),
|
||||
),
|
||||
'primary key' => array('uid', 'nid'),
|
||||
'indexes' => array(
|
||||
'nid' => array('nid'),
|
||||
),
|
||||
);
|
||||
);
|
||||
$schema['menu_router'] = array(
|
||||
'description' => t('Maps paths to various callbacks (access, page and title)'),
|
||||
'fields' => array(
|
||||
|
@ -673,117 +710,137 @@ function system_schema() {
|
|||
'type' => 'varchar',
|
||||
'length' => 255,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'load_functions' => array(
|
||||
'description' => t('A serialized array of function names (like node_load) to be called to load an object corresponding to a part of the current path.'),
|
||||
'type' => 'varchar',
|
||||
'length' => 255,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'to_arg_functions' => array(
|
||||
'description' => t('A serialized array of function names (like user_current_to_arg) to be called to replace a part of the router path with another string.'),
|
||||
'type' => 'varchar',
|
||||
'length' => 255,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'access_callback' => array(
|
||||
'description' => t('The callback which determines the access to this router path. Defaults to user_access.'),
|
||||
'type' => 'varchar',
|
||||
'length' => 255,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'access_arguments' => array(
|
||||
'description' => t('A serialized array of arguments for the access callback.'),
|
||||
'type' => 'text',
|
||||
'not null' => FALSE),
|
||||
'not null' => FALSE,
|
||||
),
|
||||
'page_callback' => array(
|
||||
'description' => t('The name of the function that renders the page.'),
|
||||
'type' => 'varchar',
|
||||
'length' => 255,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'page_arguments' => array(
|
||||
'description' => t('A serialized array of arguments for the page callback.'),
|
||||
'type' => 'text',
|
||||
'not null' => FALSE),
|
||||
'not null' => FALSE,
|
||||
),
|
||||
'fit' => array(
|
||||
'description' => t('A numeric representation of how specific the path is.'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'number_parts' => array(
|
||||
'description' => t('Number of parts in this router path.'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0,
|
||||
'size' => 'small'),
|
||||
'size' => 'small',
|
||||
),
|
||||
'tab_parent' => array(
|
||||
'description' => t('Only for local tasks (tabs) - the router path of the parent page (which may also be a local task).'),
|
||||
'type' => 'varchar',
|
||||
'length' => 255,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'tab_root' => array(
|
||||
'description' => t('Router path of the closest non-tab parent page. For pages that are not local tasks, this will be the same as the path.'),
|
||||
'type' => 'varchar',
|
||||
'length' => 255,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'title' => array(
|
||||
'description' => t('The title for the current page, or the title for the tab if this is a local task.'),
|
||||
'type' => 'varchar',
|
||||
'length' => 255,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'title_callback' => array(
|
||||
'description' => t('A function which will alter the title. Defaults to t()'),
|
||||
'type' => 'varchar',
|
||||
'length' => 255,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'title_arguments' => array(
|
||||
'description' => t('A serialized array of arguments for the title callback. If empty, the title will be used as the sole argument for the title callback.'),
|
||||
'type' => 'varchar',
|
||||
'length' => 255,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'type' => array(
|
||||
'description' => t('Numeric representation of the type of the menu item, like MENU_LOCAL_TASK.'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'block_callback' => array(
|
||||
'description' => t('Name of a function used to render the block on the system administration page for this item.'),
|
||||
'type' => 'varchar',
|
||||
'length' => 255,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'description' => array(
|
||||
'description' => t('A description of this item.'),
|
||||
'type' => 'text',
|
||||
'not null' => TRUE),
|
||||
'not null' => TRUE,
|
||||
),
|
||||
'position' => array(
|
||||
'description' => t('The position of the block (left or right) on the system administration page for this item.'),
|
||||
'type' => 'varchar',
|
||||
'length' => 255,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'weight' => array(
|
||||
'description' => t('Weight of the element. Lighter weights are higher up, heavier weights go down.'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'file' => array(
|
||||
'description' => t('The file to include for this element, usually the page callback function lives in this file.'),
|
||||
'type' => 'text',
|
||||
'size' => 'medium')
|
||||
'size' => 'medium',
|
||||
),
|
||||
),
|
||||
'indexes' => array(
|
||||
'fit' => array('fit'),
|
||||
'tab_parent' => array('tab_parent')
|
||||
),
|
||||
'tab_parent' => array('tab_parent'),
|
||||
),
|
||||
'primary key' => array('path'),
|
||||
);
|
||||
);
|
||||
|
||||
$schema['menu_links'] = array(
|
||||
'description' => t('Contains the individual links within a menu.'),
|
||||
|
@ -793,158 +850,181 @@ function system_schema() {
|
|||
'type' => 'varchar',
|
||||
'length' => 32,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'mlid' => array(
|
||||
'description' => t('The menu link ID (mlid) is the integer primary key.'),
|
||||
'type' => 'serial',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE),
|
||||
'not null' => TRUE,
|
||||
),
|
||||
'plid' => array(
|
||||
'description' => t('The parent link ID (plid) is the mlid of the link above in the hierarchy, or zero if the link is at the top level in its menu.'),
|
||||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'link_path' => array(
|
||||
'description' => t('The Drupal path or external path this link points to.'),
|
||||
'type' => 'varchar',
|
||||
'length' => 255,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'router_path' => array(
|
||||
'description' => t('For links corresponding to a Drupal path (external = 0), this connects the link to a {menu_router}.path for joins.'),
|
||||
'type' => 'varchar',
|
||||
'length' => 255,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'link_title' => array(
|
||||
'description' => t('The text displayed for the link, which may be modified by a title callback stored in {menu_router}.'),
|
||||
'type' => 'varchar',
|
||||
'length' => 255,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'options' => array(
|
||||
'description' => t('A serialized array of options to be passed to the url() or l() function, such as a query string or HTML attributes.'),
|
||||
'type' => 'text',
|
||||
'not null' => FALSE),
|
||||
'not null' => FALSE,
|
||||
),
|
||||
'module' => array(
|
||||
'description' => t('The name of the module that generated this link.'),
|
||||
'type' => 'varchar',
|
||||
'length' => 255,
|
||||
'not null' => TRUE,
|
||||
'default' => 'system'),
|
||||
'default' => 'system',
|
||||
),
|
||||
'hidden' => array(
|
||||
'description' => t('A flag for whether the link should be rendered in menus. (1 = a disabled menu item that may be shown on admin screens, -1 = a menu callback, 0 = a normal, visible link)'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0,
|
||||
'size' => 'small'),
|
||||
'size' => 'small',
|
||||
),
|
||||
'external' => array(
|
||||
'description' => t('A flag to indicate if the link points to a full URL starting with a protocol, like http:// (1 = external, 0 = internal).'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0,
|
||||
'size' => 'small'),
|
||||
'size' => 'small',
|
||||
),
|
||||
'has_children' => array(
|
||||
'description' => t('Flag indicating whether any links have this link as a parent (1 = children exist, 0 = no children).'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0,
|
||||
'size' => 'small'),
|
||||
'size' => 'small',
|
||||
),
|
||||
'expanded' => array(
|
||||
'description' => t('Flag for whether this link should be rendered as expanded in menus - expanded links always have their child links displayed, instead of only when the link is in the active trail (1 = expanded, 0 = not expanded)'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0,
|
||||
'size' => 'small'),
|
||||
'size' => 'small',
|
||||
),
|
||||
'weight' => array(
|
||||
'description' => t('Link weight among links in the same menu at the same depth.'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'depth' => array(
|
||||
'description' => t('The depth relative to the top level. A link with plid == 0 will have depth == 1.'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0,
|
||||
'size' => 'small'),
|
||||
'size' => 'small',
|
||||
),
|
||||
'customized' => array(
|
||||
'description' => t('A flag to indicate that the user has manually created or edited the link (1 = customized, 0 = not customized).'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0,
|
||||
'size' => 'small'),
|
||||
'size' => 'small',
|
||||
),
|
||||
'p1' => array(
|
||||
'description' => t('The first mlid in the materialized path. If N = depth, then pN must equal the mlid. If depth > 1 then p(N-1) must equal the plid. All pX where X > depth must equal zero. The columns p1 .. p9 are also called the parents.'),
|
||||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'p2' => array(
|
||||
'description' => t('The second mlid in the materialized path. See p1.'),
|
||||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'p3' => array(
|
||||
'description' => t('The third mlid in the materialized path. See p1.'),
|
||||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'p4' => array(
|
||||
'description' => t('The fourth mlid in the materialized path. See p1.'),
|
||||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'p5' => array(
|
||||
'description' => t('The fifth mlid in the materialized path. See p1.'),
|
||||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'p6' => array(
|
||||
'description' => t('The sixth mlid in the materialized path. See p1.'),
|
||||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'p7' => array(
|
||||
'description' => t('The seventh mlid in the materialized path. See p1.'),
|
||||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'p8' => array(
|
||||
'description' => t('The eighth mlid in the materialized path. See p1.'),
|
||||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'p9' => array(
|
||||
'description' => t('The ninth mlid in the materialized path. See p1.'),
|
||||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'updated' => array(
|
||||
'description' => t('Flag that indicates that this link was generated during the update from Drupal 5.'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0,
|
||||
'size' => 'small'),
|
||||
'size' => 'small',
|
||||
),
|
||||
),
|
||||
'indexes' => array(
|
||||
'path_menu' => array(array('link_path', 128), 'menu_name'),
|
||||
'menu_plid_expand_child' => array(
|
||||
'menu_name', 'plid', 'expanded', 'has_children'),
|
||||
'menu_parents' => array(
|
||||
'menu_name', 'p1', 'p2', 'p3', 'p4', 'p5', 'p6', 'p7', 'p8', 'p9'),
|
||||
'menu_plid_expand_child' => array('menu_name', 'plid', 'expanded', 'has_children'),
|
||||
'menu_parents' => array('menu_name', 'p1', 'p2', 'p3', 'p4', 'p5', 'p6', 'p7', 'p8', 'p9'),
|
||||
'router_path' => array(array('router_path', 128)),
|
||||
),
|
||||
),
|
||||
'primary key' => array('mlid'),
|
||||
);
|
||||
);
|
||||
|
||||
$schema['sessions'] = array(
|
||||
'description' => t("Drupal's session handlers read and write into the sessions table. Each record represents a user session, either anonymous or authenticated."),
|
||||
|
@ -953,41 +1033,47 @@ function system_schema() {
|
|||
'description' => t('The {users}.uid corresponding to a session, or 0 for anonymous user.'),
|
||||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE),
|
||||
'not null' => TRUE,
|
||||
),
|
||||
'sid' => array(
|
||||
'description' => t("Primary key: A session ID. The value is generated by PHP's Session API."),
|
||||
'type' => 'varchar',
|
||||
'length' => 64,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'hostname' => array(
|
||||
'description' => t('The IP address that last used this session ID (sid).'),
|
||||
'type' => 'varchar',
|
||||
'length' => 128,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'timestamp' => array(
|
||||
'description' => t('The Unix timestamp when this session last requested a page. Old records are purged by PHP automatically.'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'cache' => array(
|
||||
'description' => t("The time of this user's last post. This is used when the site has specified a minimum_cache_lifetime. See cache_get()."),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'session' => array(
|
||||
'description' => t('The serialized contents of $_SESSION, an array of name/value pairs that persists across page requests by this session ID. Drupal loads $_SESSION from here at the start of each request and saves it at the end.'),
|
||||
'type' => 'text',
|
||||
'not null' => FALSE,
|
||||
'size' => 'big')
|
||||
'size' => 'big',
|
||||
),
|
||||
),
|
||||
'primary key' => array('sid'),
|
||||
'indexes' => array(
|
||||
'timestamp' => array('timestamp'),
|
||||
'uid' => array('uid')
|
||||
),
|
||||
);
|
||||
'uid' => array('uid'),
|
||||
),
|
||||
);
|
||||
|
||||
$schema['system'] = array(
|
||||
'description' => t("A list of all modules, themes, and theme engines that are or have been installed in Drupal's file system."),
|
||||
|
@ -997,64 +1083,73 @@ function system_schema() {
|
|||
'type' => 'varchar',
|
||||
'length' => 255,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'name' => array(
|
||||
'description' => t('The name of the item; e.g. node.'),
|
||||
'type' => 'varchar',
|
||||
'length' => 255,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'type' => array(
|
||||
'description' => t('The type of the item, either module, theme, or theme_engine.'),
|
||||
'type' => 'varchar',
|
||||
'length' => 255,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'owner' => array(
|
||||
'description' => t("A theme's 'parent'. Can be either a theme or an engine."),
|
||||
'type' => 'varchar',
|
||||
'length' => 255,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'status' => array(
|
||||
'description' => t('Boolean indicating whether or not this item is enabled.'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'throttle' => array(
|
||||
'description' => t('Boolean indicating whether this item is disabled when the throttle.module disables throttleable items.'),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0,
|
||||
'size' => 'tiny'),
|
||||
'size' => 'tiny',
|
||||
),
|
||||
'bootstrap' => array(
|
||||
'description' => t("Boolean indicating whether this module is loaded during Drupal's early bootstrapping phase (e.g. even before the page cache is consulted)."),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'schema_version' => array(
|
||||
'description' => t("The module's database schema version number. -1 if the module is not installed (its tables do not exist); 0 or the largest N of the module's hook_update_N() function that has either been run or existed when the module was first installed."),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => -1,
|
||||
'size' => 'small'),
|
||||
'size' => 'small',
|
||||
),
|
||||
'weight' => array(
|
||||
'description' => t("The order in which this module's hooks should be invoked relative to other modules. Equal-weighted modules are ordered by name."),
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0),
|
||||
'default' => 0,
|
||||
),
|
||||
'info' => array(
|
||||
'description' => t("A serialized array containing information from the module's .info file; keys can include name, description, package, version, core, dependencies, dependents, and php."),
|
||||
'type' => 'text',
|
||||
'not null' => FALSE)
|
||||
'not null' => FALSE,
|
||||
),
|
||||
),
|
||||
'primary key' => array('filename'),
|
||||
'indexes' =>
|
||||
array(
|
||||
'modules' => array(array('type', 12), 'status', 'weight', 'filename'),
|
||||
'bootstrap' => array(array('type', 12), 'status', 'bootstrap', 'weight', 'filename'),
|
||||
),
|
||||
);
|
||||
'indexes' => array(
|
||||
'modules' => array(array('type', 12), 'status', 'weight', 'filename'),
|
||||
'bootstrap' => array(array('type', 12), 'status', 'bootstrap', 'weight', 'filename'),
|
||||
),
|
||||
);
|
||||
|
||||
$schema['url_alias'] = array(
|
||||
'description' => t('A list of URL aliases for Drupal paths; a user may visit either the source or destination path.'),
|
||||
|
@ -1063,30 +1158,38 @@ function system_schema() {
|
|||
'description' => t('A unique path alias identifier.'),
|
||||
'type' => 'serial',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE),
|
||||
'not null' => TRUE,
|
||||
),
|
||||
'src' => array(
|
||||
'description' => t('The Drupal path this alias is for; e.g. node/12.'),
|
||||
'type' => 'varchar',
|
||||
'length' => 128,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'dst' => array(
|
||||
'description' => t('The alias for this path; e.g. title-of-the-story.'),
|
||||
'type' => 'varchar',
|
||||
'length' => 128,
|
||||
'not null' => TRUE,
|
||||
'default' => ''),
|
||||
'default' => '',
|
||||
),
|
||||
'language' => array(
|
||||
'description' => t('The language this alias is for; if blank, the alias will be used for unknown languages. Each Drupal path can have an alias for each supported language.'),
|
||||
'type' => 'varchar',
|
||||
'length' => 12,
|
||||
'not null' => TRUE,
|
||||
'default' => '')
|
||||
'default' => '',
|
||||
),
|
||||
'unique keys' => array('dst_language' => array('dst', 'language')),
|
||||
),
|
||||
'unique keys' => array(
|
||||
'dst_language' => array('dst', 'language'),
|
||||
),
|
||||
'primary key' => array('pid'),
|
||||
'indexes' => array('src' => array('src')),
|
||||
);
|
||||
'indexes' => array(
|
||||
'src' => array('src'),
|
||||
),
|
||||
);
|
||||
|
||||
return $schema;
|
||||
}
|
||||
|
|
|
@ -68,7 +68,9 @@ function user_schema() {
|
|||
'description' => t('Module which is controlling the authentication.'),
|
||||
),
|
||||
),
|
||||
'unique keys' => array('authname' => array('authname')),
|
||||
'unique keys' => array(
|
||||
'authname' => array('authname'),
|
||||
),
|
||||
'primary key' => array('aid'),
|
||||
);
|
||||
|
||||
|
@ -102,7 +104,9 @@ function user_schema() {
|
|||
),
|
||||
),
|
||||
'primary key' => array('pid'),
|
||||
'indexes' => array('rid' => array('rid')),
|
||||
'indexes' => array(
|
||||
'rid' => array('rid'),
|
||||
),
|
||||
);
|
||||
|
||||
$schema['role'] = array(
|
||||
|
@ -122,7 +126,9 @@ function user_schema() {
|
|||
'description' => t('Unique role name.'),
|
||||
),
|
||||
),
|
||||
'unique keys' => array('name' => array('name')),
|
||||
'unique keys' => array(
|
||||
'name' => array('name'),
|
||||
),
|
||||
'primary key' => array('rid'),
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue