You are here

function system_update_6029 in Drupal 6

Enable the dblog module on sites that upgrade, since otherwise watchdog logging will stop unexpectedly.

Related topics

File

modules/system/system.install, line 2135

Code

function system_update_6029() {

  // The watchdog table is now owned by dblog, which is not yet
  // "installed" according to the system table, but the table already
  // exists.  We set the module as "installed" here to avoid an error
  // later.
  //
  // Although not the case for the initial D6 release, it is likely
  // that dblog.install will have its own update functions eventually.
  // However, dblog did not exist in D5 and this update is part of the
  // initial D6 release, so we know that dblog is not installed yet.
  // It is therefore correct to install it as version 0.  If
  // dblog updates exist, the next run of update.php will get them.
  drupal_set_installed_schema_version('dblog', 0);
  module_enable(array(
    'dblog',
  ));
  menu_rebuild();
  return array(
    array(
      'success' => TRUE,
      'query' => "'dblog' module enabled.",
    ),
  );
}