You are here

function multiple_email_schema in Multiple E-mail Addresses 6

Same name and namespace in other branches
  1. 7 multiple_email.install \multiple_email_schema()
  2. 2.x multiple_email.install \multiple_email_schema()

File

./multiple_email.install, line 59
Install file for multiple_email module

Code

function multiple_email_schema() {
  $schema['multiple_email'] = array(
    'description' => 'The base table for multiple email.',
    'fields' => array(
      'eid' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'uid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'email' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
      'time_registered' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'confirmed' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'confirm_code' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
      'time_code_generated' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'attempts' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'indexes' => array(
      'uid' => array(
        'uid',
      ),
    ),
    'unique keys' => array(
      'email' => array(
        'email',
      ),
    ),
    'primary key' => array(
      'eid',
    ),
  );
  return $schema;
}