function ginvite_schema_alter in Group 7
Implements hook_schema_alter().
Informs Drupal of the changes we made to {group_membership}.
File
- modules/
ginvite/ ginvite.module, line 17 - Contains invite functionality for the Group module.
Code
function ginvite_schema_alter(&$schema) {
// Include the install file for its helper functions.
module_load_install('ginvite');
// Add the invited_on and invited_by fields.
$schema['group_membership']['fields']['invited_on'] = _ginvite_invited_on();
$schema['group_membership']['fields']['invited_by'] = _ginvite_invited_by();
// Add the invited_by foreign key.
$schema['group_membership']['foreign keys']['inviter'] = array(
'table' => 'users',
'columns' => array(
'invited_by' => 'uid',
),
);
}