user_relationship_invites.install in User Relationships 5.2
File
plugins/user_relationship_invites/user_relationship_invites.install
View source
<?php
require_once drupal_get_path('module', 'user_relationships') . '/user_relationships.install';
function user_relationship_invites_install() {
$success = _user_relationships_installation_query(array(
"CREATE TABLE {user_relationship_invites} (\n inviter_uid int unsigned NOT NULL default 0,\n rtid int unsigned NOT NULL default 0,\n invite_code varchar(64) NOT NULL default '',\n KEY invite_code (invite_code)\n ) /*!40100 DEFAULT CHARACTER SET utf8*/",
), array(
"CREATE TABLE {user_relationship_invites} (\n inviter_uid int_unsigned NOT NULL default 0,\n rtid int_unsigned NOT NULL default 0,\n invite_code varchar(64) NOT NULL default ''\n )",
"CREATE INDEX {user_relationship_invites}_invite_code_idx ON {user_relationship_invites} (invite_code)",
));
if ($success) {
drupal_set_message(t('User Relationship Invite module installed successfully.'));
}
else {
drupal_set_message(t('The installation of the User Relationship Invite module as unsuccessful.'), 'error');
}
}
function user_relationship_invites_uninstall() {
db_query('DROP TABLE {user_relationship_invites}');
}