You are here

function xmlsitemap_update_7 in XML sitemap 5.2

Implementation of hook_update_N().

File

xmlsitemap/xmlsitemap.install, line 123
Install file for XML sitemap

Code

function xmlsitemap_update_7() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("ALTER TABLE {xmlsitemap} CHANGE loc loc varchar(255) NOT NULL default ''");
      break;
    case 'pgsql':
      db_change_column($ret, 'xmlsitemap', 'loc', 'loc', 'varchar(255)', array(
        'not null' => TRUE,
        'default' => "''",
      ));
      break;
  }
  $ret[] = update_sql("DELETE FROM {cache_page}\n    WHERE cid LIKE '%%gss.xsl' OR cid LIKE '%%sitemap%%.xml'");
  return $ret;
}