You are here

function seochecklist_update_5202 in SEO Checklist 5.2

Remove the {seo_checklist}.subgroup_id field and add {seo_checklist}.uid.

File

./seochecklist.install, line 241
Install, update and uninstall functions for the seochecklist module.

Code

function seochecklist_update_5202() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("ALTER TABLE {seo_checklist} DROP subgroup_id");
      $ret[] = update_sql("ALTER TABLE {seo_checklist} ADD uid int unsigned NOT NULL default '0'");
      break;
    case 'pgsql':
      $ret[] = update_sql("ALTER TABLE {seo_checklist} DROP COLUMN subgroup_id");
      db_add_column($ret, 'seo_checklist', 'uid', 'int', array(
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ));
      break;
  }
  $ret[] = update_sql("UPDATE {seo_checklist} SET module = LOWER(module)");
  return $ret;
}