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 ($input->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"; $db->query("DELETE FROM " . TABLE_PREFIX . "search"); echo "Clearing out all the old searches
\n"; echo "... done
\n"; } // ################################################################### if ($input->in['mark'] == 3) { ?>

Custom Field Updates

A change was made to the storage of custom bug field data. The data is being migrated to a different database table, but no data will be lost. This may take a few minutes. Do not go onto the next step if you receive any errors here.

query("SELECT * FROM " . TABLE_PREFIX . "bugfield"); foreach ($fields as $field) { // create the database field $db->query("ALTER TABLE " . TABLE_PREFIX . "bug ADD custom$field[fieldid] MEDIUMTEXT NULL"); echo "Migrating custom$field[fieldid]"; // update all the data $data = $db->query("SELECT * FROM " . TABLE_PREFIX . "bugvaluefill"); foreach ($data as $custom) { echo "."; $db->query("UPDATE " . TABLE_PREFIX . "bug SET custom$field[fieldid] = '" . $db->escape_string($custom["field$field[fieldid]"]) . "' WHERE bugid = $custom[bugid]"); } echo "done
\n"; } echo ".... all done
\n"; } // ################################################################### if ($input->in['mark'] == 4) { ?>

Database Table Changes

A few new features require new database tables, so we're adding those now.

query("DROP TABLE " . TABLE_PREFIX . "bugvaluefill"); echo "Dropping the old storage system for custom field data
"; $db->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 ($input->in['mark'] == 5) { ?>

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'"); $db->query("REPLACE INTO " . TABLE_PREFIX . "setting (varname, value) VALUES ('authmethod', 'default')"); $db->query("REPLACE INTO " . TABLE_PREFIX . "setting (varname, value) VALUES ('columnoptions', '" . $db->escape_string('a:12:{s:5:"bugid";s:1:"1";s:7:"summary";s:1:"2";s:8:"reporter";s:1:"2";s:7:"product";s:1:"3";s:9:"component";s:1:"0";s:7:"version";s:1:"3";s:6:"status";s:1:"4";s:10:"resolution";s:1:"4";s:8:"priority";s:1:"5";s:8:"severity";s:1:"5";s:8:"lastpost";s:1:"6";s:5:"votes";s:1:"0";}') . "')"); $db->query("REPLACE INTO " . TABLE_PREFIX . "fieldhelp (keystring, title, body) VALUES ('columnorder', 'Custom Column Ordering', 'You can change the ordering and display of columns on the bug list using these settings. Any column with a position value of "0" will not be displayed in the list. Columns are positioned in the grid with the lowest numbered column starting at the far-left. If columns share a position number, they will be placed in the same column position.')"); build_user_help(); build_settings(); ?> ... done.