You are here

function visitors_schema in Visitors 8.2

Same name and namespace in other branches
  1. 8 visitors.install \visitors_schema()
  2. 7.2 visitors.install \visitors_schema()
  3. 7 visitors.install \visitors_schema()
  4. 7.0 visitors.install \visitors_schema()

Implementats of hook_schema().

File

./visitors.install, line 44
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;
}