You are here

function mail_logger_update_7001 in Mail Logger 7

Add 'ipaddr' column.

File

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

Code

function mail_logger_update_7001() {
  if (db_field_exists('mail_logger', 'ipaddr')) {
    return t('mail_logger_update_7001 was unneccessary.');
  }
  else {
    db_add_field('mail_logger', 'ipaddr', array(
      'description' => 'IP Address of User',
      'type' => 'varchar',
      'length' => 45,
      'initial' => '',
    ), array(
      'indexes' => array(
        'ipaddr' => array(
          'ipaddr',
        ),
      ),
    ));
    return t('The Mail_logger "ipaddr" field was added.');
  }
}