function visitors_schema in Visitors 8
Same name and namespace in other branches
- 8.2 visitors.install \visitors_schema()
 - 7.2 visitors.install \visitors_schema()
 - 7 visitors.install \visitors_schema()
 - 7.0 visitors.install \visitors_schema()
 
Implementats of hook_schema().
File
- ./
visitors.install, line 41  - Install/uninstall visitors module.
 
Code
function visitors_schema() {
  $schema['visitors'] = array(
    'fields' => array(
      'visitors_id' => array(
        'type' => 'serial',
        'not null' => TRUE,
      ),
      'visitors_uid' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'visitors_ip' => array(
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
      ),
      'visitors_date_time' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'visitors_url' => array(
        'type' => 'text',
        'not null' => TRUE,
      ),
      'visitors_referer' => array(
        'type' => 'text',
        'not null' => TRUE,
      ),
      'visitors_path' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'visitors_title' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'visitors_user_agent' => array(
        'type' => 'text',
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'visitors_id',
    ),
  );
  return $schema;
}