function purl_schema in Persistent URL 7
Same name and namespace in other branches
- 8 purl.install \purl_schema()
- 6 purl.install \purl_schema()
Implements hook_schema().
File
- ./
purl.install, line 30 - Install, update and uninstall functions for the purl module.
Code
function purl_schema() {
$schema['purl'] = array(
'description' => 'purl.',
'fields' => array(
'value' => array(
'description' => 'The string to detect from incoming URLs and to use when rewriting outgoing URLs.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'provider' => array(
'description' => 'The provider (usually a module\'s name) of the prefix/id pair.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'id' => array(
'description' => 'The ID given by the provider to associate with a corresponding prefix. This might be a group_nid (og), a language code (i18n) or some other unique identifier that the provider is interested in associating with the URL prefix.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'value',
),
'indexes' => array(
'provider_id' => array(
'provider',
'id',
),
),
);
return $schema;
}