function spam_update_2 in Spam 5
File
- ./
spam.install, line 308
Code
function spam_update_2() {
$ret = array();
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
$ret[] = update_sql("CREATE TABLE {spam_reported} (\n rid int(11) unsigned NOT NULL auto_increment,\n source varchar(64) NOT NULL default '',\n id int(11) unsigned NOT NULL default '0',\n uid int(10) unsigned NOT NULL default '0',\n hostname varchar(128) NOT NULL default '',\n feedback text NULL default '',\n timestamp int(11) unsigned default '0',\n PRIMARY KEY rid (rid),\n KEY source (source),\n KEY id (id),\n KEY uid (uid)\n ) TYPE=MyISAM;");
break;
case 'pgsql':
$ret[] = update_sql("CREATE TABLE {spam_reported} (\n rid serial PRIMARY KEY,\n source varchar(64) NOT NULL default '',\n id integer NOT NULL default 0,\n uid integer NOT NULL default 0,\n hostname varchar(128) NOT NULL default '',\n feedback text NULL default '',\n timestamp integer default 0);");
break;
}
return $ret;
}