function entity_test_schema

Same name in other branches
  1. 9 core/modules/system/tests/modules/entity_test/entity_test.install \entity_test_schema()
  2. 8.9.x core/modules/system/tests/modules/entity_test/entity_test.install \entity_test_schema()
  3. 11.x core/modules/system/tests/modules/entity_test/entity_test.install \entity_test_schema()

Implements hook_schema().

File

core/modules/system/tests/modules/entity_test/entity_test.install, line 41

Code

function entity_test_schema() {
    // Schema for simple entity.
    $schema['entity_test_example'] = [
        'description' => 'Stores entity_test items.',
        'fields' => [
            'id' => [
                'type' => 'serial',
                'not null' => TRUE,
                'description' => 'Primary Key: Unique entity-test item ID.',
            ],
        ],
        'primary key' => [
            'id',
        ],
    ];
    return $schema;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.