in['mark'] == 0)
{
?>
Welcome to Bugdar
This upgrade will move you from Bugdar 1.1.5 to Bugdar 1.2.0 Beta 1.
To begin the process, please click the button below.
in['mark'] == 1)
{
?>
Minor Database Table Changes
There are a few minor changes made to Bugdar's database schema that need to be propagated.
query("ALTER TABLE " . TABLE_PREFIX . "comment ADD parselinks BOOL NULL");
echo "Adding comment.parselinks to add an option to parse links in comments
\n";
$db->query("ALTER TABLE " . TABLE_PREFIX . "user ADD columnoptions TEXT NULL");
echo "Adding user.columnoptions to allow for custom column sorting
\n";
$db->query("ALTER TABLE " . TABLE_PREFIX . "product CHANGE componentmother parentid INT UNSIGNED NULL");
echo "Renaming product.componentmother to product.parentid
\n";
$db->query("ALTER TABLE " . TABLE_PREFIX . "version ADD obsolete BOOL NULL");
echo "Adding version.obsolete so products cannot be filed against certain versions
\n";
$db->query("ALTER TABLE " . TABLE_PREFIX . "user ADD authid VARCHAR(255) NULL");
echo "Adding user.authid for the Authentication API
\n";
echo "... done
\n";
}
// ###################################################################
if ($bugsys->in['mark'] == 2)
{
?>
Search Table Changes
To support saved searches, a few major modifications need to be performed on the search table.
query("ALTER TABLE " . TABLE_PREFIX . "search DROP PRIMARY KEY");
echo "Dropping current primary key
\n";
$db->query("ALTER TABLE " . TABLE_PREFIX . "search ADD searchid INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY");
echo "Adding search.searchid as a new primary key
\n";
$db->query("ALTER TABLE " . TABLE_PREFIX . "search ADD name VARCHAR(250) NULL");
echo "Adding search.name to allow naming of searches
\n";
echo "... done
\n";
}
// ###################################################################
if ($bugsys->in['mark'] == 3)
{
?>
Database Table Additions
A few new features require new database tables, so we're adding those now.
query("
CREATE TABLE " . TABLE_PREFIX . "passwordreset
(
activatorid VARCHAR(250) NOT NULL,
userid INT NOT NULL,
dateline INT NOT NULL,
PRIMARY KEY (activatorid)
)
");
echo "Creating passwordreset table to create a 'lost password' functionality
\n";
$db->query("
CREATE TABLE " . TABLE_PREFIX . "adminsession
(
sessionid VARCHAR(250) NOT NULL,
userid INT UNSIGNED NOT NULL,
dateline INT UNSIGNED NOT NULL,
PRIMARY KEY (sessionid)
)
");
echo "Creating adminsession table to greatly improve the admin control panel security
\n";
$db->query("
CREATE TABLE " . TABLE_PREFIX . "template
(
filename VARCHAR(255) NOT NULL,
template TEXT NOT NULL,
timestamp INT(10) UNSIGNED NOT NULL,
PRIMARY KEY (filename)
)
");
echo "Creating template table to cache templates in the database to greatly inprove speed
\n";
echo "... done
\n";
}
// ###################################################################
if ($bugsys->in['mark'] == 4)
{
?>
Version Number Change
This step finishes the upgrade by inreasing your version number.
query("UPDATE " . TABLE_PREFIX . "setting SET value = '1.2.0 Beta 1' WHERE varname = 'trackerversion'");
build_settings();
?>
... done.