You are here

function google_calendar_block_update_7200 in Google Calendar Block 7.2

Remove any old Google Calendar Block blocks and install the new Google Calendar Block schema.

File

./google_calendar_block.install, line 118
Install, update and uninstall functions for the google_calendar_block module.

Code

function google_calendar_block_update_7200() {

  // Remove old Google Calendar Block schema.
  drupal_uninstall_schema('google_calendar_block');

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

  // Clear the site cache.
  cache_clear_all();

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