function votingapi_update_7 in Voting API 6
Same name and namespace in other branches
- 5 votingapi.install \votingapi_update_7()
- 6.2 votingapi.install \votingapi_update_7()
File
- ./
votingapi.install, line 148
Code
function votingapi_update_7() {
// There are quite a few changes. Let's just take the easy way and nuke this puppy.
// Nothing has been using the tables up to this point, anyhow.
$ret[] = update_sql("DROP TABLE {votingapi_action_set}");
$ret[] = update_sql("DROP TABLE {votingapi_action_condition}");
$ret[] = update_sql("DROP TABLE {votingapi_action}");
$ret[] = update_sql("CREATE TABLE {votingapi_action_set} (\n name varchar(64) NOT NULL,\n parent_name varchar(64) default NULL,\n content_type varchar(20) default NULL,\n source varchar(64) default NULL,\n description varchar(255) default NULL,\n required int(8) NOT NULL default '0',\n criteria_mask varchar(8) default 'AND',\n weight int(10) NOT NULL default 0,\n PRIMARY KEY (name)\n ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
$ret[] = update_sql("CREATE TABLE {votingapi_action_condition} (\n name varchar(64) NOT NULL,\n parent_name varchar(64) default NULL,\n description varchar(255) default NULL,\n weight int(10) NOT NULL default 0,\n data varchar(255),\n handler varchar(255) NOT NULL,\n PRIMARY KEY (name)\n ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
$ret[] = update_sql("CREATE TABLE {votingapi_action} (\n parent_name varchar(64) NOT NULL,\n aid varchar(255) NOT NULL\n ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
return $ret;
}