function follow_schema in Follow 8.2
Same name and namespace in other branches
- 6 follow.install \follow_schema()
- 7.2 follow.install \follow_schema()
- 7 follow.install \follow_schema()
Implements hook_schema().
File
- ./
follow.install, line 11 - Install, update and uninstall functions for the follow module.
Code
function follow_schema() {
$schema['follow_links'] = array(
'description' => 'Stores sitewide and user follow links.',
'fields' => array(
'lid' => array(
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
'description' => 'Unique identifier for the {follow_links}.',
),
'name' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => "The machine name of the {follow_links}.",
),
'uid' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => "User's {users} uid. Sitewide {follow_links} use uid 0",
),
'path' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => 'The Drupal path or extenal URL the {follow_links} should point to.',
),
'options' => array(
'description' => 'A serialized array of options to be passed to the url() or l() function, such as a query string or HTML attributes.',
'type' => 'text',
'translatable' => TRUE,
'serialize' => TRUE,
),
'title' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => 'The human readable name for the link.',
),
'weight' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'size' => 'tiny',
'description' => 'The weight of this {follow_links}.',
),
),
'primary key' => array(
'lid',
),
'unique keys' => array(
'uid_name' => array(
'uid',
'name',
),
),
);
return $schema;
}