0, "revert_all_themes" => 0, "revert_all_settings" => 0 ); @set_time_limit(0); function upgrade42_dbchanges() { global $db, $output; $output->print_header("Updating Database"); echo "

Performing necessary upgrade queries...

"; flush(); if($db->field_exists('ipaddress', 'pollvotes')) { $db->drop_column('pollvotes', 'ipaddress'); } switch($db->type) { case "pgsql": $db->add_column("pollvotes", "ipaddress", "bytea NOT NULL default ''"); break; case "sqlite": $db->add_column("pollvotes", "ipaddress", "blob(16) NOT NULL default ''"); break; default: $db->add_column("pollvotes", "ipaddress", "varbinary(16) NOT NULL default ''"); break; } $output->print_contents("

Click next to continue with the upgrade process.

"); $output->print_footer("42_done"); }