function tweet_feed_schema in Tweet Feed 6
Same name and namespace in other branches
- 7.3 tweet_feed.install \tweet_feed_schema()
- 7 tweet_feed.install \tweet_feed_schema()
- 7.2 tweet_feed.install \tweet_feed_schema()
implementation of hook_schema()
File
- ./
tweet_feed.install, line 6
Code
function tweet_feed_schema() {
$schema['tweet_feed'] = array(
'description' => 'A cache for twitter feeds.',
'fields' => array(
'tweet_id' => array(
'description' => 'The twitter tweet id for this tweet.',
'type' => 'int',
'size' => 'big',
'not null' => FALSE,
),
'tweet' => array(
'description' => 'The text of the tweet.',
'type' => 'text',
'size' => 'normal',
'not null' => TRUE,
),
'created_at' => array(
'description' => 'The date the tweet was posted (timestamp)',
'type' => 'int',
'length' => 11,
'not null' => TRUE,
),
'user_id' => array(
'description' => 'The user ID of the poster',
'type' => 'varchar',
'length' => 24,
'not null' => TRUE,
),
'profile_image_url' => array(
'description' => 'The URL of the image for the poster of this tweet',
'type' => 'text',
'size' => 'normal',
'not null' => TRUE,
),
'profile_image_https_url' => array(
'description' => 'The secure URL of the image for the poster of this tweet',
'type' => 'text',
'size' => 'normal',
'not null' => TRUE,
),
'screen_name' => array(
'description' => 'The screen name of the person tweeting',
'type' => 'varchar',
'length' => 24,
'not null' => TRUE,
),
'hashtags' => array(
'description' => 'A comma separated list of hashtags without the hash.',
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
),
),
'primary key' => array(
'tweet_id',
),
);
return $schema;
}