You are here

function panels_update_5215 in Panels 5.2

Same name and namespace in other branches
  1. 6.3 panels.install \panels_update_5215()

Increase the size of the data column in the {panels_object_cache} table on MySQL.

Also gets rid of some duplicate indexes resulting the CREATE TABLE queries in the install() of schema 5214

File

./panels.install, line 510

Code

function panels_update_5215() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("ALTER TABLE {panels_object_cache} CHANGE COLUMN data data longtext");
      $ret[] = update_sql("ALTER TABLE {panels_page} DROP INDEX name_2");
      $ret[] = update_sql("ALTER TABLE {panels_object_cache} DROP INDEX {panels_object_cache}_idx");
      $ret[] = update_sql("ALTER TABLE {panels_pane} ADD PRIMARY KEY (pid)");
      break;
    case 'pgsql':
      $ret[] = update_sql("ALTER TABLE {panels_pane} ADD PRIMARY KEY (pid)");
  }
  return $ret;
}