key.install in Key 7.2
Same filename and directory in other branches
Install, update and uninstall functions for the Key module.
File
key.installView source
<?php
/**
* @file
* Install, update and uninstall functions for the Key module.
*/
/**
* Implements hook_schema().
*
* Create table to store key configurations.
*/
function key_schema() {
$schema['key_config'] = array(
'description' => 'Stores key configurations.',
'fields' => array(
'name' => array(
'description' => 'The machine name of the configuration.',
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
),
'label' => array(
'description' => 'The human-readable label of the configuration.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'description' => array(
'description' => 'A brief description of the configuration.',
'type' => 'text',
'not null' => TRUE,
'size' => 'medium',
),
'provider' => array(
'description' => 'The key provider to use.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'provider_settings' => array(
'description' => 'Additional settings for the key provider.',
'type' => 'blob',
'not null' => FALSE,
'size' => 'big',
),
'created' => array(
'description' => 'The Unix timestamp when the configuration was created.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'changed' => array(
'description' => 'The Unix timestamp when the configuration was last saved.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
),
'indexes' => array(
'label' => array(
'label',
),
'provider' => array(
'provider',
),
),
'primary key' => array(
'name',
),
);
return $schema;
}
Functions
Name | Description |
---|---|
key_schema | Implements hook_schema(). |