You are here

function advpoll_schema in Advanced Poll 7.3

Same name and namespace in other branches
  1. 6.3 advpoll.install \advpoll_schema()
  2. 6 advpoll.install \advpoll_schema()
  3. 6.2 advpoll.install \advpoll_schema()
  4. 7 advpoll.install \advpoll_schema()
  5. 7.2 advpoll.install \advpoll_schema()

Implements hook_schema().

File

./advpoll.install, line 11
Install file for Advanced Poll.

Code

function advpoll_schema() {

  // Install electoral list table.
  $schema['advpoll_electoral_list'] = array(
    'fields' => array(
      'nid' => array(
        'description' => 'Node id for the relevant advpoll.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'uid' => array(
        'description' => 'User id who will be given access to vote in an advpoll.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'nid',
      'uid',
    ),
  );
  return $schema;
}