You are here

function faq_update_1 in Frequently Asked Questions 5

Same name and namespace in other branches
  1. 5.2 faq.install \faq_update_1()
  2. 6 faq.install \faq_update_1()
  3. 7.2 faq.install \faq_update_1()
  4. 7 faq.install \faq_update_1()

File

./faq.install, line 90

Code

function faq_update_1() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("CREATE TABLE IF NOT EXISTS {faq_weights} (\n        tid INT(10) UNSIGNED NOT NULL DEFAULT '0',\n        nid INT(10) NOT NULL DEFAULT '0',\n        weight TINYINT(4) NOT NULL DEFAULT '0',\n        PRIMARY KEY (tid, nid)\n      ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
      break;
    case 'pgsql':
      $ret[] = update_sql('CREATE TABLE {faq_weights} (
        tid integer NOT NULL DEFAULT 0,
        nid integer NOT NULL DEFAULT 0,
        weight smallint NOT NULL DEFAULT 0,
        PRIMARY KEY (tid, nid)
      );');
      break;
  }
  return $ret;
}