function weather_update_3 in Weather 5
Same name and namespace in other branches
- 5.6 weather.install \weather_update_3()
File
- ./weather.install, line 229
Code
function weather_update_3() {
$ret = array();
$sql = "DROP TABLE {weather_config}";
$ret[] = update_sql($sql);
$sql = "CREATE TABLE {weather_config} (\n uid INTEGER DEFAULT 0 NOT NULL,\n cid INTEGER DEFAULT 0 NOT NULL,\n icao VARCHAR(4) DEFAULT '' NOT NULL,\n real_name VARCHAR(255) DEFAULT '' NOT NULL,\n units VARCHAR(8) DEFAULT 'metric' NOT NULL,\n weight INTEGER DEFAULT 0 NOT NULL,\n PRIMARY KEY (uid, cid)\n )";
if ($GLOBALS['db_type'] == 'mysql' or $GLOBALS['db_type'] == 'mysqli') {
$sql .= " /*!40100 DEFAULT CHARACTER SET utf8 */";
}
$ret[] = update_sql($sql);
return $ret;
}