You are here

function invite_update_200 in Invite 6.2

Same name and namespace in other branches
  1. 5.2 invite.install \invite_update_200()
  2. 7.2 invite.install \invite_update_200()

1. Allow multiple invitations for the same e-mail address. 2. Changed some column names to be more descriptive. 3. Added a column to flag canceled invites. 4. Added resent column.

File

./invite.install, line 335
Installation file for invite module.

Code

function invite_update_200() {
  $ret = array();
  db_drop_primary_key($ret, 'invite');
  db_add_index($ret, 'invite', 'email', array(
    'email',
  ));
  db_change_field($ret, 'invite', 'mid', 'invitee', array(
    'type' => 'int',
    'unsigned' => TRUE,
    'not null' => TRUE,
    'default' => 0,
  ));
  db_change_field($ret, 'invite', 'timestamp', 'joined', array(
    'type' => 'int',
    'unsigned' => TRUE,
    'not null' => TRUE,
    'default' => 0,
  ));
  db_add_field($ret, 'invite', 'created', array(
    'type' => 'int',
    'unsigned' => TRUE,
    'not null' => TRUE,
    'default' => 0,
  ));
  db_add_field($ret, 'invite', 'canceled', array(
    'type' => 'int',
    'size' => 'tiny',
    'unsigned' => TRUE,
    'not null' => TRUE,
    'default' => 0,
  ));
  db_add_field($ret, 'invite', 'resent', array(
    'type' => 'int',
    'size' => 'tiny',
    'unsigned' => TRUE,
    'not null' => TRUE,
    'default' => 0,
  ));
  return $ret;
}