shoutbox_group.install in Shoutbox 7        
                          
                  
                        
  
  
  
File
  shoutbox_group/shoutbox_group.install
  
    View source  
  <?php
function shoutbox_group_schema() {
  $schema['shoutbox_groups'] = array(
    'description' => 'Link shouts to their respected group.',
    'fields' => array(
      'shout_id' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'description' => 'The shout id',
      ),
      'nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'description' => 'The organic group node id',
      ),
    ),
    'primary key' => array(
      'shout_id',
    ),
  );
  return $schema;
}
function shoutbox_group_uninstall() {
  drupal_uninstall_schema('shoutbox_group');
}
function shoutbox_group_update_6200() {
  db_query("UPDATE {shoutbox} s INNER JOIN {shoutbox_groups} sg ON s.shout_id = sg.shout_id SET s.module = 'shoutbox_group'");
  return array();
}