You are here

function panels_mini_update_5002 in Panels 5.2

Get rid of a duplicate index resulting from the CREATE TABLE queries in the install() of panels schema 5214

File

panels_mini/panels_mini.install, line 150

Code

function panels_mini_update_5002() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $ret[] = array(
        'success' => TRUE,
        'query' => t('It does NOT matter if the following query fails. If it fails, it means you did not have a duplicate \'name_2\' index, and trying to remove a non-existent index does not harm, alter, or otherwise affect your database in any way. If it succeeds, then the duplicate index is gone, and your table is as it should be.'),
      );
      $ret[] = update_sql("ALTER TABLE {panels_mini} DROP INDEX name_2");
  }
  return $ret;
}