favorites.install in Favorites 7
Same filename and directory in other branches
Install, update and uninstall functions for the Favorites module.
File
favorites.installView source
<?php
/**
* @file
* Install, update and uninstall functions for the Favorites module.
*/
/**
* Implementats hook_schema().
*/
function favorites_schema() {
$schema = array();
$schema['favorites'] = array(
'description' => "Stores each user's favorite path.",
'fields' => array(
'fid' => array(
'description' => 'The unique ID of the favoite',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'uid' => array(
'description' => 'The user ID of the user who owns the favorite.',
'type' => 'int',
'size' => 'normal',
'not null' => TRUE,
),
'path' => array(
'description' => 'The favorited path',
'type' => 'varchar',
'length' => 1024,
'not null' => TRUE,
),
'title' => array(
'description' => 'The title of the favorite',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
),
'query' => array(
'description' => "The query parameters for the saved path.",
'type' => 'varchar',
'length' => 1024,
'not null' => TRUE,
),
'timestamp' => array(
'description' => "The time the favorite was created",
'type' => 'int',
'size' => 'normal',
'not null' => TRUE,
),
),
'primary key' => array(
'fid',
),
'indexes' => array(
'uid' => array(
'uid',
),
),
);
return $schema;
}
Functions
Name | Description |
---|---|
favorites_schema | Implementats hook_schema(). |