You are here

function avatar_selection_update_1 in Avatar Selection 5

Same name and namespace in other branches
  1. 5.2 avatar_selection.install \avatar_selection_update_1()
  2. 6 avatar_selection.install \avatar_selection_update_1()
  3. 7 avatar_selection.install \avatar_selection_update_1()

File

./avatar_selection.install, line 71

Code

function avatar_selection_update_1() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysqli':
    case 'mysql':
      $ret[] = update_sql("CREATE TABLE if not exists {avatar_selection} (\n        avatar varchar(255) NOT NULL UNIQUE,\n        access varchar(255),\n        PRIMARY KEY (avatar)\n      ) /*!40100 DEFAULT CHARACTER SET utf8 */");
      break;
    case 'pgsql':
      $ret[] = update_sql("CREATE TABLE {avatar_selection} (\n        avatar varchar(255) NOT NULL UNIQUE,\n        access varchar(255),\n        PRIMARY KEY (avatar)\n      )");
      break;
  }
  return $ret;
}