You are here

function mailhandler_schema in Mailhandler 6

Same name and namespace in other branches
  1. 6.2 mailhandler.install \mailhandler_schema()
  2. 7.2 mailhandler.install \mailhandler_schema()
  3. 7 mailhandler.install \mailhandler_schema()

Implementation of hook_schema().

File

./mailhandler.install, line 41
Install, uninstall, schema and update functions for Mailhandler module.

Code

function mailhandler_schema() {
  $schema = array();
  $schema['mailhandler'] = array(
    'description' => t('Mailhandler table'),
    'fields' => array(
      'mid' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'disp-width' => '10',
      ),
      'mail' => array(
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,
      ),
      'domain' => array(
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,
      ),
      'port' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'disp-width' => '5',
      ),
      'name' => array(
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,
      ),
      'pass' => array(
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,
      ),
      'security' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'size' => 'tiny',
        'not null' => TRUE,
      ),
      'replies' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'size' => 'tiny',
        'not null' => TRUE,
        'default' => 1,
      ),
      'fromheader' => array(
        'type' => 'varchar',
        'length' => '128',
        'not null' => FALSE,
      ),
      'commands' => array(
        'type' => 'text',
        'not null' => FALSE,
      ),
      'sigseparator' => array(
        'type' => 'varchar',
        'length' => '128',
        'not null' => FALSE,
      ),
      'enabled' => array(
        'type' => 'int',
        'size' => 'tiny',
        'not null' => FALSE,
      ),
      'folder' => array(
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,
      ),
      'imap' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'size' => 'tiny',
        'not null' => TRUE,
      ),
      'mime' => array(
        'type' => 'varchar',
        'length' => '128',
        'not null' => FALSE,
      ),
      'mailto' => array(
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,
      ),
      'delete_after_read' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'size' => 'tiny',
        'not null' => TRUE,
        'default' => 1,
      ),
      'extraimap' => array(
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,
      ),
      'format' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'authentication' => array(
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,
        'default' => 'mailhandler_default',
      ),
    ),
    'primary key' => array(
      'mid',
    ),
    'indexes' => array(
      'mail' => array(
        'mail',
      ),
    ),
  );
  return $schema;
}