user_variable.install in User variable 7
Same filename and directory in other branches
Install, uninstall functions for the user_variable module.
File
user_variable.installView source
<?php
/**
* @file
* Install, uninstall functions for the user_variable module.
*/
/**
* Implements hook_schema().
*/
function user_variable_schema() {
$schema = array();
$schema['user_variable'] = array(
'description' => 'Stores user variables.',
'fields' => array(
'uid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => 'User {users}.uid.',
),
'sid' => array(
'description' => 'A session ID. The value is generated by PHP`s Session API.',
'type' => 'varchar',
'length' => 64,
'not null' => TRUE,
'default' => '',
),
'name' => array(
'description' => 'The name of the variable.',
'type' => 'varchar',
'length' => 128,
'not null' => TRUE,
'default' => '',
),
'value' => array(
'description' => 'The value of the variable.',
'type' => 'text',
'not null' => TRUE,
'size' => 'big',
),
'expired' => array(
'type' => 'int',
'description' => 'Time to which the variable is valid.',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'common' => array(
'type' => 'int',
'description' => 'Common variable.',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
),
);
return $schema;
}
Functions
Name | Description |
---|---|
user_variable_schema | Implements hook_schema(). |