function encrypt_update_7202 in Encrypt 7.3
Same name and namespace in other branches
- 7.2 encrypt.install \encrypt_update_7202()
Create table to store encryption configurations.
File
- ./
encrypt.install, line 216 - Install, update and uninstall functions for the encrypt module.
Code
function encrypt_update_7202() {
$table = array(
'description' => 'Stores encryption 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',
),
'method' => array(
'description' => 'The encryption method to use.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'method_settings' => array(
'description' => 'Additional settings for the encryption method.',
'type' => 'blob',
'not null' => TRUE,
'size' => 'big',
),
'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' => TRUE,
'size' => 'big',
),
'enabled' => array(
'description' => 'A boolean indicating whether this configuration is enabled.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'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(
'enabled' => array(
'enabled',
),
),
'primary key' => array(
'name',
),
);
if (!db_table_exists('encrypt_config')) {
db_create_table('encrypt_config', $table);
}
}