function avatar_selection_update_3 in Avatar Selection 5.2
Adds to the current table structure another two columns, 'weight' and 'name'.
Return value
Array to which query results will be added.
File
- ./
avatar_selection.install, line 162 - The Avatar Selection module install file.
Code
function avatar_selection_update_3() {
$ret = array();
switch ($GLOBALS['db_type']) {
case 'mysqli':
case 'mysql':
$ret[] = update_sql("ALTER TABLE {avatar_selection} ADD COLUMN weight int(10) NOT NULL DEFAULT 0");
$ret[] = update_sql("ALTER TABLE {avatar_selection} ADD COLUMN name varchar(255)");
break;
case 'pgsql':
$ret[] = update_sql("ALTER TABLE {avatar_selection} ADD COLUMN weight integer NOT NULL DEFAULT 0");
$ret[] = update_sql("ALTER TABLE {avatar_selection} ADD COLUMN name varchar(255)");
break;
}
return $ret;
}