You are here

function configuration_schema in Configuration Management 7

Same name and namespace in other branches
  1. 7.2 configuration.install \configuration_schema()

Implements hook_schema().

File

./configuration.install, line 6

Code

function configuration_schema() {
  $schema['config_export'] = array(
    'description' => 'The table that holds the status of what is being tracked in configuration management.',
    'fields' => array(
      'cid' => array(
        'description' => 'The primary identifier for a configuration.',
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'name' => array(
        'type' => 'varchar',
        'length' => '128',
        'default' => '',
        'not null' => TRUE,
        'description' => 'The unique name of the configuration item. This is the primary field configurations are loaded from.',
      ),
      'owner' => array(
        'type' => 'varchar',
        'length' => '32',
        'default' => '',
        'not null' => TRUE,
        'description' => 'The module name that owns the configuration item.',
      ),
      'status' => array(
        'type' => 'int',
        'not null' => TRUE,
        // Set the default to ENTITY_CUSTOM without using the constant as it is
        // not safe to use it at this point.
        'default' => 0x0,
        'size' => 'tiny',
        'description' => 'The exportable status of a configuration.',
      ),
      'hash' => array(
        'type' => 'char',
        'not null' => TRUE,
        'default' => '',
        'length' => '32',
        'description' => 'The last hash status of a configuration.',
      ),
      'parent' => array(
        'type' => 'varchar',
        'length' => '256',
        'default' => '',
        'description' => 'Holds the name of parent configs',
      ),
      'dependencies' => array(
        'type' => 'text',
        'size' => 'normal',
        'description' => 'Holds a serialized array of module dependencies',
      ),
    ),
    'primary key' => array(
      'cid',
    ),
    'indexes' => array(
      'plugin' => array(
        'owner',
      ),
    ),
  );
  $schema['cache_configuration'] = drupal_get_schema_unprocessed('system', 'cache');
  return $schema;
}