You are here

function tweet_feed_schema in Tweet Feed 7

Same name and namespace in other branches
  1. 6 tweet_feed.install \tweet_feed_schema()
  2. 7.3 tweet_feed.install \tweet_feed_schema()
  3. 7.2 tweet_feed.install \tweet_feed_schema()

Implements hook_schema().

5 calls to tweet_feed_schema()
tweet_feed_update_7108 in ./tweet_feed.install
Add a field to hold our comma delimited list of hashtags.
tweet_feed_update_7109 in ./tweet_feed.install
Add a field to hold our tweet id's and remove the meaningless tid.
tweet_feed_update_7111 in ./tweet_feed.install
Add the field for holding the secure profile image for SSL enabled web sites.
tweet_feed_update_7113 in ./tweet_feed.install
Add our flag to tweets that are replies and fields for media urls.
tweet_feed_update_7115 in ./tweet_feed.install
Add the field for holding the real name of the person tweeting.

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' => FALSE,
      ),
      'profile_image_https_url' => array(
        'description' => 'The secure URL of the image for the poster of this tweet.',
        'type' => 'text',
        'size' => 'normal',
        'not null' => FALSE,
      ),
      'screen_name' => array(
        'description' => 'The screen name of the person tweeting.',
        'type' => 'varchar',
        'length' => 24,
        'not null' => TRUE,
      ),
      'name' => array(
        'description' => 'The name of the person tweeting',
        'type' => 'varchar',
        'length' => 255,
        'not null' => FALSE,
      ),
      'hashtags' => array(
        'description' => 'A comma separated list of hashtags without the hash.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => FALSE,
      ),
      'is_reply' => array(
        'description' => 'Is this tweet a reply to another?',
        'type' => 'int',
        'length' => 1,
        'not null' => TRUE,
        'default' => 0,
      ),
      'media_url' => array(
        'description' => 'The URL of the image for the poster of this tweet.',
        'type' => 'text',
        'size' => 'normal',
        'not null' => FALSE,
      ),
      'media_url_https' => array(
        'description' => 'The secure URL of the image for the poster of this tweet.',
        'type' => 'text',
        'size' => 'normal',
        'not null' => FALSE,
      ),
    ),
  );
  return $schema;
}