You are here

function shoutbox_update_6200 in Shoutbox 7.2

Same name and namespace in other branches
  1. 6.2 shoutbox.install \shoutbox_update_6200()
  2. 7 shoutbox.install \shoutbox_update_6200()

This update prepares the shoutbox database for shoutbox 6.2.x.

File

./shoutbox.install, line 144
Install, update and uninstall functions for the Shoutbox module.

Code

function shoutbox_update_6200() {
  $success_drop_url = db_drop_field('shoutbox', 'url');
  $nick_spec = array(
    'type' => 'varchar',
    'length' => 60,
    'not null' => TRUE,
    'description' => 'The author\'s nickname.',
  );
  db_change_field('shoutbox', 'nick', 'nick', $nick_spec);
  if (!$success_drop_url) {
    throw new DrupalUpdateException(t('Database \'shoutbox\' did not have a column called \'url\''));
  }
}