You are here

function fivestar_comment_schema in Fivestar 6.2

Same name and namespace in other branches
  1. 6 fivestar_comment.install \fivestar_comment_schema()

@file Installation file for Fivestar Comment module.

File

./fivestar_comment.install, line 8
Installation file for Fivestar Comment module.

Code

function fivestar_comment_schema() {
  $schema['fivestar_comment'] = array(
    'fields' => array(
      'cid' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'vote_id' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'value' => array(
        'type' => 'int',
        'size' => 'tiny',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'tag' => array(
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'default' => 'vote',
      ),
    ),
    'primary key' => array(
      'cid',
    ),
    'indexes' => array(
      'vote_id' => array(
        'vote_id',
      ),
    ),
  );
  return $schema;
}