You are here

function invite_update_7400 in Invite 7.4

Implements update from 2.x version to 4.x.

File

./invite.install, line 223
Contains install and update functions for Invite.

Code

function invite_update_7400() {
  db_rename_table('invite', 'invite_2x');
  db_rename_table('invite_notifications', 'invite_notifications_2x');

  // Create tables.
  $schema = invite_schema();
  foreach ($schema as $table_name => $specs) {
    db_create_table($table_name, $specs);
  }

  // We unable move the data because invite_by_email should be installed.
  // So all data transfer will be moved.
  variable_set('invite_version_updated', TRUE);
  variable_set('invite_default_expiry_time', 30);
  drupal_set_message(t('Invite was successfully installed. You could migrate !link.', array(
    '!link' => l(t('old invites'), 'admin/config/people/invite/migrate'),
  )));
}