You are here

function advpoll_schema in Advanced Poll 7.2

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.3 advpoll.install \advpoll_schema()
  5. 7 advpoll.install \advpoll_schema()

@file Install file for Advanced Poll Much thanks to the example modules. MW

File

./advpoll.install, line 9
Install file for Advanced Poll Much thanks to the example modules. MW

Code

function advpoll_schema() {

  // Install electoral list table
  $schema['advpoll_electoral_list'] = array(
    'fields' => array(
      'nid' => array(
        'description' => t('Node id for the relevant advpoll.'),
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'uid' => array(
        'description' => t('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;
}