Commit f5d4287c authored by Dries's avatar Dries

- Patch #214271 by recidive: improved schema identation.

parent 637ec935
......@@ -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'),
);
......
This diff is collapsed.
......@@ -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;
}
This diff is collapsed.
......@@ -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'),
);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment