You are here

function conditional_fields_schema in Conditional Fields 7.3

Same name and namespace in other branches
  1. 6.2 conditional_fields.install \conditional_fields_schema()
  2. 6 conditional_fields.install \conditional_fields_schema()

Implements hook_schema().

File

./conditional_fields.install, line 10
Install, update and uninstall functions for the Conditional Fields module.

Code

function conditional_fields_schema() {
  $schema['conditional_fields'] = array(
    'description' => 'Stores dependencies between fields.',
    'fields' => array(
      'id' => array(
        'type' => 'serial',
        'not null' => TRUE,
        'description' => 'The primary identifier for a dependency.',
      ),
      'dependee' => array(
        'type' => 'int',
        'not null' => TRUE,
        'description' => 'The id of the dependee field instance.',
      ),
      'dependent' => array(
        'type' => 'int',
        'not null' => TRUE,
        'description' => 'The id of the dependent field instance.',
      ),
      'options' => array(
        'type' => 'blob',
        'size' => 'big',
        'not null' => TRUE,
        'serialize' => TRUE,
        'description' => 'Serialized data containing the options for the dependency.',
      ),
    ),
    'primary key' => array(
      'id',
    ),
  );
  return $schema;
}