You are here

function good_schema in Coder 8.3.x

Same name and namespace in other branches
  1. 8.3 tests/Drupal/good/good.install \good_schema()
  2. 8.2 coder_sniffer/Drupal/Test/good/good.install \good_schema()
  3. 7.2 coder_sniffer/Test/good/good.install \good_schema()

Implements hook_schema().

File

tests/Drupal/good/good.install, line 11
Install, update and uninstall functions for the good module.

Code

function good_schema() {
  $schema['good'] = array(
    // Example (partial) specification for table "node".
    'description' => 'The base table for nodes.',
    'fields' => array(
      'nid' => array(
        'description' => 'The primary identifier for a node.',
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'vid' => array(
        'description' => 'The current {node_revision}.vid version identifier.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'type' => array(
        'description' => 'The {node_type} of this node.',
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
      ),
      'title' => array(
        'description' => 'The title of this node, always treated as non-markup plain text.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
    ),
    'primary key' => array(
      'nid',
    ),
  );
  return $schema;
}