You are here

function farm_quick_schema in farmOS 7

Implements hook_schema().

File

modules/farm/farm_quick/farm_quick.install, line 10
Farm quick install.

Code

function farm_quick_schema() {
  $schema['farm_quick_entity'] = array(
    'description' => 'Entities created via quick forms.',
    'fields' => array(
      'entity_type' => array(
        'description' => 'Entity type.',
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
      ),
      'entity_id' => array(
        'description' => 'Entity ID.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'quick_form_id' => array(
        'description' => 'Quick form ID.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
    ),
    'indexes' => array(
      'entity_type' => array(
        'entity_type',
      ),
      'entity_id' => array(
        'entity_id',
      ),
      'quick_form_id' => array(
        'quick_form_id',
      ),
    ),
  );
  return $schema;
}