Issue #1848516 by IshaDakota: Fix coding style in hook_schema() example function body

merge-requests/26/head
Jennifer Hodgdon 2012-11-26 12:57:43 -08:00
parent 452e0ec3eb
commit c2dd699c38
1 changed files with 15 additions and 11 deletions

View File

@ -3092,44 +3092,48 @@ function hook_schema() {
'description' => 'The primary identifier for a node.', 'description' => 'The primary identifier for a node.',
'type' => 'serial', 'type' => 'serial',
'unsigned' => TRUE, 'unsigned' => TRUE,
'not null' => TRUE), 'not null' => TRUE,
),
'vid' => array( 'vid' => array(
'description' => 'The current {node_revision}.vid version identifier.', 'description' => 'The current {node_revision}.vid version identifier.',
'type' => 'int', 'type' => 'int',
'unsigned' => TRUE, 'unsigned' => TRUE,
'not null' => TRUE, 'not null' => TRUE,
'default' => 0), 'default' => 0,
),
'type' => array( 'type' => array(
'description' => 'The {node_type} of this node.', 'description' => 'The {node_type} of this node.',
'type' => 'varchar', 'type' => 'varchar',
'length' => 32, 'length' => 32,
'not null' => TRUE, 'not null' => TRUE,
'default' => ''), 'default' => '',
),
'title' => array( 'title' => array(
'description' => 'The title of this node, always treated as non-markup plain text.', 'description' => 'The title of this node, always treated as non-markup plain text.',
'type' => 'varchar', 'type' => 'varchar',
'length' => 255, 'length' => 255,
'not null' => TRUE, 'not null' => TRUE,
'default' => ''), 'default' => '',
), ),
),
'indexes' => array( 'indexes' => array(
'node_changed' => array('changed'), 'node_changed' => array('changed'),
'node_created' => array('created'), 'node_created' => array('created'),
), ),
'unique keys' => array( 'unique keys' => array(
'nid_vid' => array('nid', 'vid'), 'nid_vid' => array('nid', 'vid'),
'vid' => array('vid') 'vid' => array('vid'),
), ),
'foreign keys' => array( 'foreign keys' => array(
'node_revision' => array( 'node_revision' => array(
'table' => 'node_revision', 'table' => 'node_revision',
'columns' => array('vid' => 'vid'), 'columns' => array('vid' => 'vid'),
), ),
'node_author' => array( 'node_author' => array(
'table' => 'users', 'table' => 'users',
'columns' => array('uid' => 'uid') 'columns' => array('uid' => 'uid'),
), ),
), ),
'primary key' => array('nid'), 'primary key' => array('nid'),
); );
return $schema; return $schema;