You are here

function word_link_schema in Word Link 7

Same name and namespace in other branches
  1. 8 word_link.install \word_link_schema()
  2. 7.2 word_link.install \word_link_schema()

Implements of hook_schema().

1 call to word_link_schema()
word_link_update_7002 in ./word_link.install
Adding rel field.

File

./word_link.install, line 36
Install, update, and uninstall functions for the word_link module.

Code

function word_link_schema() {
  $schema['word_link'] = array(
    'fields' => array(
      'id' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'text' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'case_sensitive' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 1,
        'size' => 'tiny',
      ),
      'url' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'url_title' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'class' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => 'word-link',
      ),
      'rel' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'visibility' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'size' => 'tiny',
      ),
      'except' => array(
        'type' => 'text',
        'length' => 255,
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'id',
    ),
  );
  return $schema;
}