You are here

function simplenews_update_6100 in Simplenews 6.2

Add (un)subscription data to table simplenews_snid_tid.

File

./simplenews.install, line 711
Simplenews installation.

Code

function simplenews_update_6100() {
  $ret = array();
  db_add_field($ret, 'simplenews_snid_tid', 'status', array(
    'description' => 'A flag indicating whether the user is subscribed (1) or unsubscribed (0).',
    'type' => 'int',
    'size' => 'small',
    'not null' => TRUE,
    'default' => 1,
  ));
  db_add_field($ret, 'simplenews_snid_tid', 'timestamp', array(
    'description' => 'UNIX timestamp of when the user is (un)subscribed.',
    'type' => 'int',
    'unsigned' => TRUE,
    'not null' => TRUE,
    'default' => 0,
  ));
  db_add_field($ret, 'simplenews_snid_tid', 'source', array(
    'description' => 'The source via which the user is (un)subscription.',
    'type' => 'varchar',
    'length' => 24,
    'not null' => TRUE,
    'default' => '',
  ));
  return $ret;
}