franck@0: 'Saves some statistics foreach group', franck@0: 'fields' => array( franck@0: 'nid' => array( franck@0: 'description' => "The groups's {node}.nid.", franck@0: 'type' => 'int', franck@0: 'size' => 'normal', franck@0: 'not null' => TRUE, franck@0: ), franck@0: 'members_count' => array( franck@0: 'description' => 'How many members has a group', franck@0: 'type' => 'int', franck@0: 'size' => 'normal', franck@0: 'not null' => TRUE, franck@0: ), franck@0: 'posts_count' => array( franck@0: 'description' => 'How many posts has a group', franck@0: 'type' => 'int', franck@0: 'size' => 'normal', franck@0: 'not null' => TRUE, franck@0: ), franck@0: 'comments_count' => array( franck@0: 'description' => 'How many comments has a group', franck@0: 'type' => 'int', franck@0: 'size' => 'normal', franck@0: 'not null' => TRUE, franck@0: ), franck@0: 'last_node_timestamp' => array( franck@0: 'description' => 'Last Time when a in the group was created.', franck@0: 'type' => 'int', franck@0: 'size' => 'normal', franck@0: 'not null' => FALSE, franck@0: 'default' => 0, franck@0: ), franck@0: 'last_comment_timestamp' => array( franck@0: 'description' => 'Last Time when a comment in the group was created.', franck@0: 'type' => 'int', franck@0: 'size' => 'normal', franck@0: 'not null' => FALSE, franck@0: 'default' => 0, franck@0: ), franck@0: 'last_member_timestamp' => array( franck@0: 'description' => 'Last Time when a user joins a group.', franck@0: 'type' => 'int', franck@0: 'size' => 'normal', franck@0: 'not null' => FALSE, franck@0: 'default' => 0, franck@0: ), franck@0: ), franck@0: 'primary key' => array('nid'), franck@0: ); franck@0: franck@0: return $schema; franck@0: } franck@0: franck@0: /** franck@0: * Implemenation of hook_uninstall(). franck@0: */ franck@0: function og_statistics_uninstall() { franck@0: drupal_uninstall_schema('og_statistics'); franck@0: }