You are here

function farm_update_7053 in farmOS 7

Remove farm tours.

File

./farm.install, line 971
farmOS install file.

Code

function farm_update_7053(&$sandbox) {

  // Perform the tasks from bootstrap_tour_uninstall().
  field_attach_delete_bundle('bootstrap_tour', 'bootstrap_tour');

  // Uninstall bootstrap_tour, farm_tour, and inline_entity_form modules.
  $modules = array(
    'bootstrap_tour',
    'farm_tour',
    'inline_entity_form',
  );
  foreach ($modules as $module) {
    db_query("DELETE FROM {system} WHERE name = '{$module}' AND type = 'module'");
  }
  $tables = array(
    'bootstrap_tour_step',
    'bootstrap_tour_tour',
  );
  foreach ($tables as $table) {
    db_query("DROP TABLE {$table}");
  }
}