function gotwo_schema in Go - url redirects 6
Same name and namespace in other branches
- 7 gotwo.install \gotwo_schema()
Implementation of hook_schema().
File
- ./
gotwo.install, line 31 - 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' => 255,
'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',
),
);
/* TODO
'language' => array(
'type' => 'varchar',
'length' => 12,
'not null' => TRUE,
'default' => '',
'description' => 'Language dependend path',
)
*/
return $schema;
}