You are here

function example_schema in Coder 7

Same name and namespace in other branches
  1. 7.2 coder_upgrade/tests/old/samples/example.module \example_schema()

File

coder_upgrade/tests/old/samples/example.module, line 400

Code

function example_schema() {
  return array(
    'forum' => array(
      'description' => t('Stores the relationship of nodes to forum terms.'),
      'fields' => array(
        'nid' => array(
          'description' => t('The {node}.nid of the node.'),
        ),
      ),
    ),
    // This tests the #schema_html upgrade.
    'foo_url' => array(
      'description' => t('Stores URLs that appear in <a href=....> tags.'),
      'fields' => array(
        'url' => array(
          'description' => t('The URL.'),
        ),
      ),
    ),
    // When did the description item come into play between above and below???
    'example' => array(
      'fields' => array(
        'nid' => array(
          'type' => 'int',
          'unsigned' => TRUE,
          'not null' => TRUE,
          'default' => 0,
        ),
      ),
      'primary key' => array(
        'nid',
      ),
    ),
  );
}