1 entity_test.install entity_test_schema()

Implements hook_schema().

File

core/modules/entity/tests/entity_test/entity_test.install, line 36
Install, update and uninstall functions for the entity_test module.

Code

function entity_test_schema() {
  $schema['entity_test'] = array(
    'description' => 'Stores entity_test items.',
    'fields' => array(
      'id' => array(
        'type' => 'serial',
        'not null' => TRUE,
        'description' => 'Primary Key: Unique entity_test item ID.',
      ),
      'name' => array(
        'description' => 'The name of the 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('id'),
  );
  return $schema;
}