You are here

function word_link_update_7002 in Word Link 7.2

Same name and namespace in other branches
  1. 7 word_link.install \word_link_update_7002()

Adding a weight and rel column.

File

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

Code

function word_link_update_7002() {
  if (!db_field_exists('word_link', 'weight')) {
    db_add_field('word_link', 'weight', array(
      'description' => 'Weight of the word. Lighter weights are higher up, heavier weights go down.',
      'type' => 'int',
      'not null' => TRUE,
      'default' => 0,
    ));
  }
  if (!db_field_exists('word_link', 'rel')) {
    db_add_field('word_link', 'rel', array(
      'type' => 'varchar',
      'length' => 30,
      'not null' => TRUE,
      'default' => '',
    ));
  }
}