You are here

function gotwo_schema in Go - url redirects 7

Same name and namespace in other branches
  1. 6 gotwo.install \gotwo_schema()

Implements hook_schema().

File

./gotwo.install, line 26
Installation script for the gotwo.module

Code

function gotwo_schema() {
  $schema['gotwo'] = array(
    'description' => 'Stores gotwo settings.',
    'fields' => array(
      'gid' => array(
        'type' => 'serial',
        'not null' => TRUE,
        'description' => 'Primary Key: Unique gotwo ID.',
      ),
      'src' => array(
        'type' => 'varchar',
        'length' => 128,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The label used in the go url, this will automatically be made suitable.',
      ),
      'dst' => array(
        'type' => 'varchar',
        'length' => 2048,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The target url. Can be a relative drupal url or an absolute url.',
      ),
      'cnt' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'description' => 'Count clicks on the link.',
      ),
    ),
    'unique keys' => array(
      'src' => array(
        'src',
      ),
    ),
    'primary key' => array(
      'gid',
    ),
  );
  return $schema;
}