You are here

efq_views_test.install in EntityFieldQuery Views Backend 7

File

tests/efq_views_test.install
View source
<?php

function efq_views_test_schema() {
  $schema['efq_views_test'] = array(
    'description' => 'The base table for EFQ Views test entities.',
    'fields' => array(
      'eid' => array(
        'description' => 'The primary identifier for this entity.',
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'ebundle' => array(
        'description' => 'The bundle of this entity.',
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
      ),
      'language' => array(
        'description' => 'The {languages}.language of this entity.',
        'type' => 'varchar',
        'length' => 12,
        'not null' => TRUE,
        'default' => '',
      ),
      'elabel' => array(
        'description' => 'The label of this entity.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'uid' => array(
        'description' => 'The {users}.uid that owns this entity; initially, this is the user that created it.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'test_boolean' => array(
        'description' => 'A boolean property.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 1,
      ),
      'test_integer' => array(
        'description' => 'An integer property.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 1,
      ),
      'test_decimal' => array(
        'description' => 'A decimal property.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 1,
      ),
      'test_duration' => array(
        'description' => 'A duration property.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 1,
      ),
      'test_date' => array(
        'description' => 'A date property.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 1,
      ),
      'test_text' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
    ),
    'foreign keys' => array(
      'efq_views_test_author' => array(
        'table' => 'users',
        'columns' => array(
          'uid' => 'uid',
        ),
      ),
    ),
    'primary key' => array(
      'eid',
    ),
  );
  return $schema;
}

Functions