You are here

function twitter_block_update_7200 in Twitter Block 7.2

Remove any old Twitter Block blocks and install the new Twitter Block schema.

File

./twitter_block.install, line 89
Install, update and uninstall functions for the twitter_block module.

Code

function twitter_block_update_7200() {

  // Remove old Twitter Block schema.
  drupal_uninstall_schema('twitter_block');

  // Remove any old Twitter Block blocks.
  db_delete('block')
    ->condition('module', 'twitter_block')
    ->execute();
  db_delete('block_role')
    ->condition('module', 'twitter_block')
    ->execute();

  // Clear the site cache.
  cache_clear_all();

  // Install the new Twitter Block schema.
  drupal_install_schema('twitter_block');
  return t('Removed any old Twitter Block blocks and installed the new Twitter Block schema.');
}