function avatar_selection_update_1 in Avatar Selection 5.2
Same name and namespace in other branches
- 5 avatar_selection.install \avatar_selection_update_1()
- 6 avatar_selection.install \avatar_selection_update_1()
- 7 avatar_selection.install \avatar_selection_update_1()
Create the new 'avatar_selection' sql table structure for updating from an older installation.
Return value
Array to which query results will be added.
File
- ./
avatar_selection.install, line 112 - The Avatar Selection module install file.
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;
}