Index: modules/actions/actions.schema =================================================================== RCS file: /cvs/drupal/drupal/modules/actions/actions.schema,v retrieving revision 1.2 diff -u -p -r1.2 actions.schema --- modules/actions/actions.schema 1 Jul 2007 15:37:08 -0000 1.2 +++ modules/actions/actions.schema 9 Aug 2007 03:59:53 -0000 @@ -3,24 +3,77 @@ function actions_schema() { $schema['actions'] = array( + 'description' => t('Stores individual actions that may be applied in the system.'), 'fields' => array( - 'aid' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '0'), - 'type' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''), - 'callback' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'parameters' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), - 'description' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '0'), + 'aid' => array( + 'type' => 'varchar', + 'length' => 255, + 'not null' => TRUE, + 'default' => '0', + 'description' => t('Primary Key: Unique action ID.'), + ), + 'type' => array( + 'type' => 'varchar', + 'length' => 32, + 'not null' => TRUE, + 'default' => '', + 'description' => t('The module from which the action originates; for example, node or comment.'), + ), + 'callback' => array( + 'type' => 'varchar', + 'length' => 255, + 'not null' => TRUE, + 'default' => '', + 'description' => t('The callback function to trigger when the action fires.'), + ), + 'parameters' => array( + 'type' => 'text', + 'not null' => TRUE, + 'size' => 'big', + 'description' => t('A serialized array of action parameters; used with advanced actions.'), + ), + 'description' => array( + 'type' => 'varchar', + 'length' => 255, + 'not null' => TRUE, + 'default' => '0', + 'description' => t('A human-readable description of what the action does.'), + ), ), 'primary key' => array('aid'), ); $schema['actions_assignments'] = array( + 'description' => t('Maps actions to hook and operation assignments from actions.module.'), 'fields' => array( - 'hook' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''), - 'op' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''), - 'aid' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), + 'hook' => array( + 'type' => 'varchar', + 'length' => 32, + 'not null' => TRUE, + 'default' => '', + 'description' => t('The name of the internal Drupal hook upon which an action is firing; for example, nodeapi.'), + ), + 'op' => array( + 'type' => 'varchar', + 'length' => 32, + 'not null' => TRUE, + 'default' => '', + 'description' => t('The specific operation of the hook upon which an action is firing: for example, presave.'), + ), + 'aid' => array( + 'type' => 'varchar', + 'length' => 255, + 'not null' => TRUE, + 'default' => '', + 'description' => t('Foreign Key: Unique action ID'), + ), 'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), ), 'index keys' => array( - 'hook_op' => array('hook', 'op')) + 'hook_op' => array('hook', 'op'), + ), + 'foreign key' => array( + 'aid' => array('actions', 'aid'), + ), ); return $schema; } Index: modules/aggregator/aggregator.schema =================================================================== RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.schema,v retrieving revision 1.3 diff -u -p -r1.3 aggregator.schema --- modules/aggregator/aggregator.schema 15 Jul 2007 10:09:21 -0000 1.3 +++ modules/aggregator/aggregator.schema 9 Aug 2007 03:59:53 -0000 @@ -3,45 +3,157 @@ function aggregator_schema() { $schema['aggregator_category'] = array( + 'description' => t('Stores categories for aggregator feeds and feed items.'), 'fields' => array( - 'cid' => array('type' => 'serial', 'not null' => TRUE), - 'title' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'description' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), - 'block' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny') + 'cid' => array( + 'type' => 'serial', + 'not null' => TRUE, + 'description' => t('Primary Key: Unique aggregator category ID.'), + ), + 'title' => array( + 'type' => 'varchar', + 'length' => 255, + 'not null' => TRUE, + 'default' => '', + 'description' => t('Title of the category.'), + ), + 'description' => array( + 'type' => 'text', + 'not null' => TRUE, + 'size' => 'big', + 'description' => t('Description of the category'), + ), + 'block' => array( + 'type' => 'int', + 'not null' => TRUE, + 'default' => 0, + 'size' => 'tiny', + 'description' => t('TODO: ???'), + ) ), 'primary key' => array('cid'), 'unique keys' => array('title' => array('title')), ); $schema['aggregator_category_feed'] = array( + 'description' => t('Bridge table; maps feeds to categories.'), 'fields' => array( - 'fid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'cid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0) + 'fid' => array( + 'type' => 'int', + 'not null' => TRUE, + 'default' => 0, + 'description' => t('Foreign Key: Unique feed ID.'), + ), + 'cid' => array( + 'type' => 'int', + 'not null' => TRUE, + 'default' => 0, + 'description' => t('Foreign Key: Unique aggregator category ID.'), + ) ), 'primary key' => array('fid', 'cid'), + 'foreign key' => array( + 'fid' => array('aggregator_feed', 'fid'), + 'cid' => array('aggregator_category', 'cid'), + ), ); $schema['aggregator_category_item'] = array( + 'description' => t('Bridge table; maps feed items to categories.'), 'fields' => array( - 'iid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'cid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0) + 'iid' => array( + 'type' => 'int', + 'not null' => TRUE, + 'default' => 0, + 'description' => t('Foreign Key: Unique feed item ID.'), + ), + 'cid' => array( + 'type' => 'int', + 'not null' => TRUE, + 'default' => 0, + 'description' => t('Foreign Key: Unique aggregator category ID.'), + ) ), 'primary key' => array('iid', 'cid'), + 'foreign key' => array( + 'iid' => array('aggregator_item', 'iid'), + 'cid' => array('aggregator_category', 'cid'), + ), ); $schema['aggregator_feed'] = array( + 'description' => t('Stores feeds to be parsed by the aggregator.'), 'fields' => array( - 'fid' => array('type' => 'serial', 'not null' => TRUE), - 'title' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'url' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'refresh' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'checked' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'link' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'description' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), - 'image' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), - 'etag' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'modified' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'block' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny') + 'fid' => array( + 'type' => 'serial', + 'not null' => TRUE, + 'description' => t('Primary Key: Unique feed ID.'), + ), + 'title' => array( + 'type' => 'varchar', + 'length' => 255, + 'not null' => TRUE, + 'default' => '', + 'description' => t('Title of the feed.'), + ), + 'url' => array( + 'type' => 'varchar', + 'length' => 255, + 'not null' => TRUE, + 'default' => '', + 'description' => t('URL to the feed.'), + ), + 'refresh' => array( + 'type' => 'int', + 'not null' => TRUE, + 'default' => 0, + 'description' => t('How often to check for new feed items, in seconds.'), + ), + 'checked' => array( + 'type' => 'int', + 'not null' => TRUE, + 'default' => 0, + 'description' => t('Last time feed was checked for new items, as Unix timestamp.'), + ), + 'link' => array( + 'type' => 'varchar', + 'length' => 255, + 'not null' => TRUE, + 'default' => '', + 'description' => t('The parent website of the feed; comes from the element in the feed.'), + ), + 'description' => array( + 'type' => 'text', + 'not null' => TRUE, + 'size' => 'big', + 'description' => t("The parent website's description; comes from the element in the feed."), + ), + 'image' => array( + 'type' => 'text', + 'not null' => TRUE, + 'size' => 'big', + 'description' => t('TODO: ???'), + ), + 'etag' => array( + 'type' => 'varchar', + 'length' => 255, + 'not null' => TRUE, + 'default' => '', + 'description' => t('TODO: ???'), + ), + 'modified' => array( + 'type' => 'int', + 'not null' => TRUE, + 'default' => 0, + 'description' => t('When the feed was last modified, as a Unix timestamp.'), + ), + 'block' => array( + 'type' => 'int', + 'not null' => TRUE, + 'default' => 0, + 'size' => 'tiny', + 'description' => t('TODO: ???'), + ) ), 'unique keys' => array( 'url' => array('url'), @@ -51,18 +163,61 @@ function aggregator_schema() { ); $schema['aggregator_item'] = array( + 'description' => t('Stores the individual items imported from feeds.'), 'fields' => array( - 'iid' => array('type' => 'serial', 'not null' => TRUE), - 'fid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'title' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'link' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'author' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'description' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), - 'timestamp' => array('type' => 'int', 'not null' => FALSE), - 'guid' => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE) + 'iid' => array( + 'type' => 'serial', + 'not null' => TRUE, + 'description' => t('Primary Key: Unique ID for feed item.'), + ), + 'fid' => array( + 'type' => 'int', + 'not null' => TRUE, + 'default' => 0, + 'description' => t('Foreign Key: Feed ID to which this item belongs.'), + ), + 'title' => array( + 'type' => 'varchar', + 'length' => 255, + 'not null' => TRUE, + 'default' => '', + 'description' => t('Title of the feed item.'), + ), + 'link' => array( + 'type' => 'varchar', + 'length' => 255, + 'not null' => TRUE, + 'default' => '', + 'description' => t('Link to the feed item.'), + ), + 'author' => array( + 'type' => 'varchar', + 'length' => 255, + 'not null' => TRUE, + 'default' => '', + 'description' => t('Author of the feed item.'), + ), + 'description' => array( + 'type' => 'text', + 'not null' => TRUE, + 'size' => 'big', + 'description' => t('Body of the feed item.'), + ), + 'timestamp' => array( + 'type' => 'int', + 'not null' => FALSE, + 'description' => t('Post date of feed item, as a Unix timestamp.'), + ), + 'guid' => array( + 'type' => 'varchar', + 'length' => 255, + 'not null' => FALSE, + 'description' => t('TODO: ???'), + ) ), 'indexes' => array('fid' => array('fid')), 'primary key' => array('iid'), + 'foreign key' => array('fid' => array('aggregator_feed', 'fid')), ); return $schema;