You are here

function panels_update_5218 in Panels 6.3

Same name and namespace in other branches
  1. 5.2 panels.install \panels_update_5218()

Oversight in 5216: 'tinyint' is not a field type in pgsql; the type we wanted was 'smallint.'

File

./panels.install, line 819

Code

function panels_update_5218() {
  if (!empty($GLOBALS['SKIP_PANELS_UPDATES'])) {
    return array();
  }
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $ret[] = array(
        'success' => TRUE,
        'query' => t('Update #5218 only has changes for PostgreSQL. There are no updates for MySQL databases - since you\'re running MySQL, you should consider this update successful.'),
      );
      break;
    case 'pgsql':
      db_add_column($ret, 'panels_pane', 'shown', 'smallint', array(
        'default' => 1,
      ));
      db_add_column($ret, 'panels_display', 'hide_title', 'smallint', array(
        'default' => 0,
      ));
      $ret[] = array(
        'success' => TRUE,
        'query' => t('You can disregard failed attempts to add new columns in update #5216 as long as the two queries preceding this text were successful.'),
      );
  }
  return $ret;
}