You are here

function views_update_3 in Views (for Drupal 7) 5

File

./views.install, line 305

Code

function views_update_3() {
  $ret = array();

  //  db_add_column($ret, 'view_view', 'page_empty', 'longtext');
  //  db_add_column($ret, 'view_view', 'page_empty_format', 'int(4)', array('not null' => TRUE));
  //  db_add_column($ret, 'view_view', 'block_use_page_empty', 'int(1)');
  //  db_add_column($ret, 'view_view', 'block_empty', 'longtext');
  //  db_add_column($ret, 'view_view', 'block_empty_format', 'int(4)', array('not null' => TRUE));
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("CREATE TABLE if not exists {view_exposed_filter} (\n        vid int(10) unsigned NOT NULL default '0',\n        field varchar(255),\n        label varchar(255),\n        optional int(1),\n        is_default int(1),\n        operator int(1),\n        single int(1),\n        position int(2),\n        KEY (vid)\n      ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;");
      break;
    case 'pgsql':
      $ret[] = update_sql("CREATE TABLE {view_exposed_filter} (\n        vid numeric(10) unsigned NOT NULL default '0',\n        field varchar(255),\n        label varchar(255),\n        optional numeric(1),\n        is_default numeric(1),\n        operator numeric(1),\n        single numeric(1),\n        position numeric(2),\n      )");
      $ret[] = update_sql("CREATE INDEX {view_exposed_filter}_vid_idx ON {view_exposed_filter} (vid)");
      break;
  }
  return $ret;
}