t('aggregates session time and login count for users'), 'fields' => array( 'uid' => array( 'description' => t('The ID for a user.'), 'type' => 'int', 'not null' => TRUE, ), 'unique_sessions' => array( 'description' => t('The number of unique sessions created for a user, (logins).'), 'type' => 'int', 'not null' => TRUE, 'default' => 0, ), 'elapsed_time' => array( 'description' => t('The total time a user has been active on the site.'), 'type' => 'int', 'not null' => TRUE, 'default' => 0, ), 'since' => array( 'description' => 'The Unix timestamp at which the record was first inserted.', 'type' => 'int', 'not null' => TRUE, 'default' => 0, ), ), 'primary key' => array('uid'), ); return $schema; } /** * Implementation of hook_install() */ function session_aggregator_install() { drupal_install_schema('session_aggregator'); } /** * Implementation of hook_uninstall() */ function session_aggregator_uninstall() { drupal_uninstall_schema('session_aggregator'); }