function ViewsSqlTest::schemaDefinition

The schema definition.

4 calls to ViewsSqlTest::schemaDefinition()
ViewsHandlerFilterCombineTest::schemaDefinition in tests/handlers/views_handler_filter_combine.test
Allow {views_test}.job to be NULL.
ViewsHandlerFilterNumericTest::schemaDefinition in tests/handlers/views_handler_filter_numeric.test
The schema definition.
ViewsHandlerFilterStringTest::schemaDefinition in tests/handlers/views_handler_filter_string.test
The schema definition.
ViewsSqlTest::setUp in tests/views_query.test
Sets up a Drupal site for running functional and integration tests.
3 methods override ViewsSqlTest::schemaDefinition()
ViewsHandlerFilterCombineTest::schemaDefinition in tests/handlers/views_handler_filter_combine.test
Allow {views_test}.job to be NULL.
ViewsHandlerFilterNumericTest::schemaDefinition in tests/handlers/views_handler_filter_numeric.test
The schema definition.
ViewsHandlerFilterStringTest::schemaDefinition in tests/handlers/views_handler_filter_string.test
The schema definition.

File

tests/views_query.test, line 242

Class

ViewsSqlTest

Code

protected function schemaDefinition() {
    $schema['views_test'] = array(
        'description' => 'Basic test table for Views tests.',
        'fields' => array(
            'id' => array(
                'type' => 'serial',
                'unsigned' => TRUE,
                'not null' => TRUE,
            ),
            'name' => array(
                'description' => "A person's name",
                'type' => 'varchar',
                'length' => 255,
                'not null' => TRUE,
                'default' => '',
            ),
            'age' => array(
                'description' => "The person's age",
                'type' => 'int',
                'unsigned' => TRUE,
                'not null' => TRUE,
                'default' => 0,
            ),
            'job' => array(
                'description' => "The person's job",
                'type' => 'varchar',
                'length' => 255,
                'not null' => TRUE,
                'default' => 'Undefined',
            ),
            'created' => array(
                'description' => "The creation date of this record",
                'type' => 'int',
                'unsigned' => TRUE,
                'not null' => TRUE,
                'default' => 0,
            ),
        ),
        'primary key' => array(
            'id',
        ),
        'unique keys' => array(
            'name' => array(
                'name',
            ),
        ),
        'indexes' => array(
            'ages' => array(
                'age',
            ),
        ),
    );
    return $schema;
}