You are here

function services_entity_test_schema in Services Entity API 7.2

Implements hook_schema().

File

tests/services_entity_test/services_entity_test.install, line 11
services_entity_test.install Contains install hooks.

Code

function services_entity_test_schema() {
  $schema['services_entity_test'] = array(
    'description' => 'Stores services_entity_test items.',
    'fields' => array(
      'eid' => array(
        'type' => 'serial',
        'not null' => TRUE,
        'description' => 'Primary Key: Unique services_entity_test entity ID.',
      ),
      'name' => array(
        'description' => 'The name of the services_entity_test entity.',
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
      ),
      'type' => array(
        'description' => 'The type of the services_entity_test entity.',
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
      ),
      'uid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => FALSE,
        'default' => NULL,
        'description' => "The {users}.uid of the associated user.",
      ),
    ),
    'indexes' => array(
      'uid' => array(
        'uid',
      ),
    ),
    'foreign keys' => array(
      'uid' => array(
        'users' => 'uid',
      ),
    ),
    'primary key' => array(
      'eid',
    ),
  );
  return $schema;
}