You are here

function feed_path_publisher_update_2 in Feed Path Publisher 5

File

./feed_path_publisher.install, line 54

Code

function feed_path_publisher_update_2() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      db_query('CREATE TABLE {feed_path_publisher2} (
        fppid int(10) unsigned NOT NULL auto_increment,
        title varchar(50) NOT NULL,
        path_prefix varchar(100) NOT NULL,
        feed varchar(200) NOT NULL,
        weight int(11) NOT NULL,
        PRIMARY KEY  (fppid),
        UNIQUE KEY path_prefix (path_prefix, feed),
        KEY listing (weight, path_prefix, title)
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8  as (select * from {feed_path_publisher});');
      db_query('DROP TABLE {feed_path_publisher}');
      db_query('CREATE TABLE {feed_path_publisher} (
        fppid int(10) unsigned NOT NULL auto_increment,
        title varchar(50) NOT NULL,
        path_prefix varchar(100) NOT NULL,
        feed varchar(200) NOT NULL,
        weight int(11) NOT NULL,
        PRIMARY KEY  (fppid),
        UNIQUE KEY path_prefix (path_prefix, feed),
        KEY listing (weight, path_prefix, title)
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8  as (select * from {feed_path_publisher2});');
      db_query('DROP TABLE {feed_path_publisher2}');
      break;
    case 'pgsql':
      drupal_set_message('PostgreSQL is not currently supported.', 'error');
      break;
  }
  return $ret;
}