You are here

function advpoll_field_field_schema in Advanced Poll 7.2

Same name and namespace in other branches
  1. 7.3 advpoll_field/advpoll_field.install \advpoll_field_field_schema()
  2. 7 advpoll_field/advpoll_field.install \advpoll_field_field_schema()

File

advpoll_field/advpoll_field.install, line 20

Code

function advpoll_field_field_schema($field) {
  $columns = array(
    'choice_id' => array(
      'type' => 'varchar',
      'length' => 10,
      'not null' => TRUE,
    ),
    'choice' => array(
      'type' => 'varchar',
      'length' => 500,
      'not null' => TRUE,
    ),
    'write_in' => array(
      'type' => 'int',
      'unsigned' => TRUE,
      'not null' => TRUE,
      'default' => 0,
    ),
  );
  $indexes = array(
    'choice' => array(
      'choice',
    ),
  );
  return array(
    'columns' => $columns,
    'indexes' => $indexes,
  );
}