function environment_indicator_schema in Environment Indicator 7.2
Implements hook_schema().
1 call to environment_indicator_schema()
- environment_indicator_update_7200 in ./
environment_indicator.install - Add table when updating from 1.x.
File
- ./
environment_indicator.install, line 11 - Install implementation file.
Code
function environment_indicator_schema() {
$schema['environment_indicator_environment'] = array(
'description' => 'Table storing preset definitions.',
'export' => array(
'key' => 'machine',
'key name' => 'Machine name',
'primary key' => 'envid',
// Exports will be defined as $environment.
'identifier' => 'environment',
// Function hook name.
'default hook' => 'default_environment_indicator_environment',
'api' => array(
'owner' => 'environment_indicator',
// Base name for api include files.
'api' => 'default_environment_indicator_environments',
'minimum_version' => 1,
'current_version' => 1,
),
),
'fields' => array(
'machine' => array(
'type' => 'varchar',
'length' => '32',
'description' => 'Unique ID for environments.',
),
'name' => array(
'type' => 'varchar',
'length' => '255',
'description' => 'Name for the environments.',
),
'envid' => array(
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
'description' => 'Primary ID field for the table. Not used for anything except internal lookups.',
// Do not export database-only keys.
'no export' => TRUE,
),
'regexurl' => array(
'type' => 'varchar',
'length' => '255',
'description' => 'A regular expression to match against the url.',
),
'settings' => array(
'type' => 'text',
'size' => 'big',
'serialize' => TRUE,
'description' => 'Serialized array with the configuration for the environment.',
),
),
'primary key' => array(
'envid',
),
'unique keys' => array(
'name' => array(
'machine',
),
),
);
return $schema;
}