DMail Milestone 1.0
Drupal Mail Client
|
Go to the source code of this file.
Provide versionable schema functions for use with the .install file.
The _0 function will always provide the current version of the schema and is used in the hook_install and hook_uninstall implmentations. The hook_update_N implementation will use the dmail_schema_N of the same N number should it need the schema of its version.
Definition in file dmail.schema.
dmail_addrmap_table | ( | ) |
Address mapper.
Definition at line 677 of file dmail.schema.
Referenced by dmail_schema_0().
{ return array( 'description' => 'Map a preferred From address for a given To address', 'fields' => array( 'id' => array( 'type' => 'serial', 'description' => 'The primary serial key to identify this record.', 'size' => 'big', 'unsigned' => TRUE, 'not null' => TRUE, ), 'user_id' => array( 'type' => 'int', 'description' => 'The uid that created this record.', 'size' => 'big', 'unsigned' => TRUE, 'not null' => TRUE, ), 'address' => array( 'type' => 'varchar', 'description' => 'The To address to map.', 'not null' => TRUE, 'length' => 255, ), 'preferred' => array( 'type' => 'varchar', 'description' => 'The mapped From address.', 'not null' => TRUE, 'length' => 255, ), ), 'primary key' => array('id'), 'unique keys' => array( 'address' => array('user_id', 'address'), ), ); }
dmail_friends_table | ( | ) |
Dmail friends as identified by the user.
Definition at line 640 of file dmail.schema.
Referenced by dmail_schema_0().
{ return array( 'description' => 'Allow the user to identify friendly email addresses.', 'fields' => array( 'id' => array( 'type' => 'serial', 'size' => 'big', 'unsigned' => TRUE, 'not null' => TRUE, ), 'user_id' => array( 'type' => 'int', 'size' => 'big', 'unsigned' => TRUE, 'not null' => TRUE, ), 'mailaddress_id' => array( 'type' => 'int', 'size' => 'big', 'unsigned' => TRUE, 'not null' => TRUE, ), 'nickname' => array( 'type' => 'varchar', 'length' => 255, ), ), 'primary key' => array('id'), 'unique keys' => array( 'address' => array('user_id', 'mailaddress_id'), ), ); }
dmail_headerinfo_table | ( | ) |
Dmail message header information as retrieved from the mail box.
Definition at line 574 of file dmail.schema.
Referenced by dmail_schema_0().
{ return array( 'description' => 'Store the imap headerinfo information.', 'fields' => array( 'msgid' => array( 'description' => 'Unique identifier for an individual mail', 'type' => 'char', 'length' => 64, 'not null' => TRUE, ), 'headers' => array( 'type' => 'blob', 'size' => 'big', 'not null' => TRUE, ), ), 'primary key' => array('msgid'), ); }
dmail_identities_table | ( | ) |
Dmail identities as entered by the user.
Definition at line 35 of file dmail.schema.
Referenced by dmail_schema_0().
{ return array( 'description' => 'User defined imap, pop3, or nntp identities.', 'fields' => array( 'id' => array( 'type' => 'serial', 'description' => 'The primary serial key to identify this record.', 'size' => 'big', 'unsigned' => TRUE, 'not null' => TRUE, ), 'user_id' => array( 'type' => 'int', 'description' => 'The uid that created this record.', 'size' => 'big', 'unsigned' => TRUE, 'not null' => TRUE, ), 'signature_id' => array( 'type' => int, 'description' => 'The user selected signature for this identity. If 0 then none has been selected.', 'size' => 'big', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, ), 'name' => array( 'type' => 'varchar', 'description' => 'The user desired display name for this identity.', 'not null' => TRUE, 'length' => 255, ), 'created' => array( 'type' => 'datetime', 'description' => 'The date and time this record was created.', 'not null' => TRUE, 'default' => 0, ), 'lastchkd' => array( 'type' => 'datetime', 'description' => 'The date and time we last check this accounts mail.', 'not null' => TRUE, 'default' => 0, ), 'user' => array( 'type' => 'varchar', 'description' => 'The users email account login id.', 'length' => 255, 'default' => 'UNKNOWN', 'not null' => TRUE, ), 'pass' => array( 'type' => 'varchar', 'description' => 'The decipherable encrypted users password.', 'length' => 255, 'default' => 'UNKNOWN', 'not null' => TRUE, ), 'host' => array( 'type' => 'varchar', 'description' => 'The hostname for the service.', 'length' => 255, 'default' => 'localhost', 'not null' => TRUE, ), 'service' => array( 'type' => 'char', 'description' => 'The type of service (imap, pop3, nntp).', 'length' => 4, 'default' => 'imap', 'not null' => TRUE, ), 'port' => array( 'type' => 'int', 'description' => 'The port the service communicates on.', 'size' => 'small', 'default' => 143, 'not null' => TRUE, ), 'inbox' => array( 'type' => 'varchar', 'description' => 'The inbox mailbox such as INBOX.', 'length' => 255, 'default' => 'INBOX', 'not null' => TRUE, ), 'delimiter' => array( 'type' => 'char', 'description' => 'The mailbox folder delimiter.', 'length' => 1, 'default' => '.', 'not null' => TRUE, ), 'toplevel' => array( 'type' => 'int', 'size' => 'tiny', 'default' => 0, 'not null' => TRUE, ), 'orderby' => array( 'type' => 'char', 'length' => '8', 'default' => 'received', 'not null' => TRUE, ), 'sortdir' => array( 'type' => 'char', 'length' => '4', 'default' => 'desc', 'not null' => TRUE, ), 'encryption' => array( 'type' => 'char', 'description' => 'The type of encryption (none, tls, ssl).', 'length' => 4, 'default' => 'none', 'not null' => TRUE, ), 'vld8cert' => array( 'type' => 'int', 'description' => 'Validate service security certificates?', 'size' => 'tiny', 'default' => 0, 'not null' => TRUE, ), 'expunge' => array( 'type' => 'int', 'description' => 'Permanently removed the items flagged as deleted when service resource is closed?', 'size' => 'tiny', 'default' => 0, 'not null' => TRUE, ), 'readonly' => array( 'type' => 'int', 'description' => 'Open the mailbox for read only access. Normally used for debugging.', 'size' => 'tiny', 'default' => 1, 'not null' => TRUE, ), 'movedel' => array( 'type' => 'int', 'description' => 'Move items flagged as deleted to the deleted folder?', 'size' => 'tiny', 'default' => 1, 'not null' => TRUE, ), 'checkevery' => array( 'type' => 'int', 'description' => 'Check for new mail every X seconds.', 'size' => 'small', 'default' => 600, 'not null' => TRUE, ), 'smtpport' => array( 'type' => 'int', 'description' => 'The port for the SMTP service on the smtphost.', 'size' => 'small', 'default' => 25, 'not null' => TRUE, ), 'sanitizedeleted' => array( 'type' => 'int', 'description' => 'When movedel is set make sure deleted mail is actually in the specified delete folder?', 'size' => 'tiny', 'default' => 1, 'not null' => TRUE, ), 'deletefolder' => array( 'type' => 'varchar', 'description' => 'The name of the folder to store deleted mail.', 'length' => 255, ), 'draftfolder' => array( 'type' => 'varchar', 'description' => 'The name of the folder to store draft mail.', 'length' => 255, ), 'sentfolder' => array( 'type' => 'varchar', 'description' => 'The name of the folder to store sent copies.', 'length' => 255, ), 'junkfolder' => array( 'type' => 'varchar', 'description' => 'The name of the folder to store junk (a.k.a. SPAM) mail.', 'length' => 255, ), 'messages' => array( 'type' => 'int', 'size' => 'big', 'unsigned' => TRUE, 'default' => 0, 'not null' => TRUE, ), 'recent' => array( 'type' => 'int', 'size' => 'big', 'unsigned' => TRUE, 'default' => 0, 'not null' => TRUE, ), ), 'primary key' => array('id'), 'unique keys' => array( 'name' => array('name', 'user_id'), 'user' => array('user', 'user_id'), ), 'indexes' => array( 'user_id' => array('user_id'), 'signature_id' => array('signature_id'), ), ); }
dmail_junk_messages_table | ( | ) |
Messages identified as junk.
Definition at line 550 of file dmail.schema.
Referenced by dmail_schema_0().
{ return array( 'description' => 'Junk messages controller.', 'fields' => array( 'user_id' => array( 'type' => 'int', 'size' => 'big', 'unsigned' => TRUE, 'not null' => TRUE, ), 'msgid' => array( 'type' => 'char', 'length' => 64, 'description' => 'A unique identifier for the message.', 'not null' => TRUE, ), ), 'primary_key' => array('user_id', 'msgid'), ); }
dmail_mailaddresses_table | ( | ) |
Dmail mail addresses for use with friend control.
Definition at line 597 of file dmail.schema.
Referenced by dmail_schema_0().
{ return array( 'description' => 'Store the email addresses from the mail item headers', 'fields' => array( 'id' => array( 'type' => 'serial', 'size' => 'big', 'unsigned' => TRUE, 'not null' => TRUE, ), 'mbox_id' => array( 'type' => 'int', 'size' => 'big', 'unsigned' => TRUE, 'not null' => TRUE, ), 'user' => array( 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ), 'host' => array( 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ), 'personal' => array( 'type' => 'varchar', 'length' => 255, ), ), 'primary key' => array('id'), 'unique keys' => array( 'user' => array('mbox_id', 'user', 'host'), ), ); }
dmail_mbox_message_headers_table | ( | ) |
The message headers for the mailbox.
Definition at line 421 of file dmail.schema.
Referenced by dmail_schema_0().
{ return array( 'fields' => array( 'id' => array( 'type' => 'serial', 'size' => 'big', 'unsigned' => TRUE, 'not null' => TRUE, ), 'mbox_id' => array( 'type' => 'int', 'size' => 'big', 'unsigned' => TRUE, 'not null' => TRUE, ), 'msgid' => array( 'type' => 'char', 'length' => 64, 'description' => 'The md5 of the from and the md5 of the message_id.', 'not null' => TRUE, ), 'uid' => array( 'type' => 'int', 'size' => 'big', 'unsigned' => TRUE, 'default' => 0, ), 'msgno' => array( 'type' => 'int', 'size' => 'big', 'unsigned' => TRUE, 'default' => 0, ), 'recent' => array( 'type' => 'int', 'size' => 'tiny', 'unsigned' => TRUE, 'default' => 0, ), 'flagged' => array( 'type' => 'int', 'size' => 'tiny', 'unsigned' => TRUE, 'default' => 0, ), 'answered' => array( 'type' => 'int', 'size' => 'tiny', 'unsigned' => TRUE, 'default' => 0, ), 'deleted' => array( 'type' => 'int', 'size' => 'tiny', 'unsigned' => TRUE, 'default' => 0, ), 'seen' => array( 'type' => 'int', 'size' => 'tiny', 'unsigned' => TRUE, 'default' => 0, ), 'draft' => array( 'type' => 'int', 'size' => 'tiny', 'unsigned' => TRUE, 'default' => 0, ), 'display' => array( 'type' => int, 'size' => 'tiny', 'unsigned' => TRUE, 'default' => 1, ), 'created' => array( 'type' => 'datetime', 'not null' => TRUE, 'default' => 0, ), 'updated' => array( 'type' => 'datetime', 'not null' => TRUE, 'default' => 0, ), ), 'primary key' => array('id'), 'unique key' => array('mbox_id' => array('mbox_id', 'msgid')), 'indexes' => array( 'msgid' => array('msgid'), 'uid' => array('uid'), 'msgno' => array('msgno'), 'recent' => array('recent'), 'flagged' => array('flagged'), 'deleted' => array('deleted'), 'display' => array('display'), 'created' => array('created'), 'updated' => array('updated'), ), ); }
dmail_mboxes_table | ( | ) |
Dmail mail boxes as retrieved by the defined identity.
Definition at line 252 of file dmail.schema.
Referenced by dmail_schema_0().
{ return array( 'fields' => array( 'id' => array( 'type' => 'serial', 'size' => 'big', 'unsigned' => TRUE, 'not null' => TRUE, ), 'identity_id' => array( 'type' => 'int', 'size' => 'big', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, ), 'name' => array( 'type' => 'text', 'not null' => TRUE, ), 'created' => array( 'type' => 'datetime', 'not null' => TRUE, 'default' => 0 ), 'lastchkd' => array( 'type' => 'datetime', 'not null' => TRUE, 'default' => 0, ), 'attributes' => array( 'type' => 'int', 'size' => 'big', 'unsigned' => TRUE, ), 'flags' => array( 'type' => 'int', 'size' => 'big', 'unsigned' => TRUE, ), 'messages' => array( 'type' => 'int', 'size' => 'big', 'unsigned' => TRUE, ), 'recent' => array( 'type' => 'int', 'size' => 'big', 'unsigned' => TRUE, ), 'unseen' => array( 'type' => 'int', 'size' => 'big', 'unsigned' => TRUE, ), ), 'primary key' => array('id'), ); }
dmail_message_headers_table | ( | ) |
Dmail message headers control.
A message can end up in more than one mailbox. These rows contain the part of the message header that is constant in those duplicates. This allows a message to be retrieved by more than one user but the message data is stored only once.
Definition at line 352 of file dmail.schema.
Referenced by dmail_schema_0().
{ return array( 'fields' => array( 'msgid' => array( 'type' => 'char', 'length' => 64, 'description' => 'The md5 of the message_id.', 'not null' => TRUE, ), 'subject' => array( 'type' => 'varchar', 'length' => 1024, ), 're' => array( 'type' => 'int', 'size' => 'tiny', 'default' => 0, 'not null' => TRUE, 'unsigned' => TRUE, ), 'from' => array( 'type' => 'varchar', 'length' => 1024, ), 'to' => array( 'type' => 'varchar', 'length' => 1024, ), 'date' => array( 'type' => 'datetime', 'not null' => TRUE, 'default' => 0, ), 'message_id' => array( 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ), 'size' => array( 'type' => 'int', 'size' => 'big', 'unsigned' => TRUE, 'default' => 0, ), 'created' => array( 'type' => 'datetime', 'not null' => TRUE, 'default' => 0, ), 'updated' => array( 'type' => 'datetime', 'not null' => TRUE, 'default' => 0, ), ), 'primary key' => array('msgid'), 'indexes' => array( 'date' => array('date'), 'created' => array('created'), 'updated' => array('updated'), 'subject' => array('subject'), ), ); }
dmail_schema_0 | ( | ) |
The current schema version.
Definition at line 16 of file dmail.schema.
References dmail_addrmap_table(), dmail_friends_table(), dmail_headerinfo_table(), dmail_identities_table(), dmail_junk_messages_table(), dmail_mailaddresses_table(), dmail_mbox_message_headers_table(), dmail_mboxes_table(), dmail_message_headers_table(), dmail_signatures_table(), dmail_vheaders_table(), and dmail_vmboxes_table().
{ $schema['dmail_identities'] = dmail_identities_table(); $schema['dmail_mboxes'] = dmail_mboxes_table(); $schema['dmail_vmboxes'] = dmail_vmboxes_table(); $schema['dmail_message_headers'] = dmail_message_headers_table(); $schema['dmail_mbox_message_headers'] = dmail_mbox_message_headers_table(); $schema['dmail_vheaders'] = dmail_vheaders_table(); $schema['dmail_junk_messages'] = dmail_junk_messages_table(); $schema['dmail_headerinfo'] = dmail_headerinfo_table(); $schema['dmail_mailaddresses'] = dmail_mailaddresses_table(); $schema['dmail_friends'] = dmail_friends_table(); $schema['dmail_addrmap'] = dmail_addrmap_table(); $schema['dmail_signatures'] = dmail_signatures_table(); return $schema; }
dmail_signatures_table | ( | ) |
User defined signatures.
Definition at line 718 of file dmail.schema.
Referenced by dmail_schema_0().
{ return array( 'description' => 'The user defined signatures.', 'fields' => array( 'id' => array( 'type' => 'serial', 'description' => 'The primary serial key to identify this record.', 'size' => 'big', 'unsigned' => TRUE, 'not null' => TRUE, ), 'user_id' => array( 'type' => 'int', 'description' => 'The uid that created this record.', 'size' => 'big', 'unsigned' => TRUE, 'not null' => TRUE, ), 'name' => array( 'type' => 'varchar', 'description' => 'The user desired display name for this signature.', 'not null' => TRUE, 'length' => 255, ), 'created' => array( 'type' => 'datetime', 'description' => 'The date and time this record was created.', 'not null' => TRUE, 'default' => 0, ), 'updated' => array( 'type' => 'datetime', 'description' => 'The date and time this record was updated.', 'not null' => TRUE, 'default' => 0, ), 'signature' => array( 'type' => 'text', 'description' => 'The signature value.', 'size' => 'tiny', ), ), 'primary key' => array('id'), 'unique indexes' => array( 'name' => array('user_id', 'name'), ), ); }
dmail_vheaders_table | ( | ) |
Dmail virtual mail box headers for UI experience.
Definition at line 526 of file dmail.schema.
Referenced by dmail_schema_0().
{ return array( 'description' => 'Virtual mail headers', 'fields' => array( 'vmbox_id' => array( 'type' => 'int', 'size' => 'big', 'unsigned' => TRUE, 'not null' => TRUE, ), 'header_id' => array( 'type' => 'int', 'size' => 'big', 'unsigned' => TRUE, 'not null' => TRUE, ), ), 'primary key' => array('vmbox_id', 'header_id'), ); }
dmail_vmboxes_table | ( | ) |
Dmail virtual mail boxes for UI experience.
Definition at line 315 of file dmail.schema.
Referenced by dmail_schema_0().
{ return array( 'description' => 'Virtual mail boxes', 'fields' => array( 'id' => array( 'type' => 'serial', 'size' => 'big', 'unsigned' => TRUE, 'not null' => TRUE, ), 'mbox_id' => array( 'type' => 'int', 'size' => 'big', 'unsigned' => TRUE, 'not null' => TRUE, ), 'name' => array( 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, ), ), 'primary key' => array('id'), 'unique keys' => array( 'name' => array('mbox_id', 'name'), ), ); }