You are here

function mail_logger_update_7004 in Mail Logger 7

Expand 'subject' and 'mailfrom' columns.

File

./mail_logger.install, line 213
Install, update and uninstall functions for the mail_logger module.

Code

function mail_logger_update_7004() {
  db_drop_index('mail_logger', 'mailfrom');
  db_change_field('mail_logger', 'mailfrom', 'mailfrom', array(
    'description' => 'the FROM email address',
    'type' => 'varchar',
    'length' => 2047,
    'not null' => TRUE,
  ), array(
    'mailfrom' => array(
      array(
        'mailfrom',
        100,
      ),
    ),
  ));
  db_change_field('mail_logger', 'mailfrom', 'mailfrom', array(
    'description' => 'Mail subject',
    'type' => 'varchar',
    'length' => 2047,
    'not null' => TRUE,
  ), array(
    'subject' => array(
      array(
        'subject',
        20,
      ),
    ),
  ));
  db_add_index('mail_logger', 'mailfrom', array(
    array(
      'mailfrom',
      100,
    ),
  ));
  return t('The Mail_logger "mailfrom" and "subject" columns have been expanded.');
}