You are here

function redirect_update_2 in Redirect 7

Same name and namespace in other branches
  1. 7.2 redirect.install \redirect_update_2()

Add the {redirect}.uid field.

File

./redirect.install, line 170
Install, update and uninstall functions for the redirect module.

Code

function redirect_update_2() {
  $field = array(
    'type' => 'int',
    'unsigned' => TRUE,
    'not null' => TRUE,
    'default' => 0,
    'description' => 'The {users}.uid of the user who created the redirect.',
  );
  db_add_field('redirect', 'uid', $field);
  db_update('redirect')
    ->fields(array(
    'uid' => 1,
  ))
    ->execute();
}