in['mark'] == 0) { ?>
This upgrade will take from Bugdar 1.0.1 to Bugdar 1.1.0 Beta 1.
The following steps will make changes to your database schema so that you can run Bugdar 1.1.0 Beta 1. Please note that this upgrade requires the clearing of any stored searches; we apologize for this inconvenience.
To begin the process, please click the button below.
in['mark'] == 1) { ?>Major table additions and deletions are being performed on your database.
query(" CREATE TABLE " . TABLE_PREFIX . "useremail ( userid int unsigned not null, relation int unsigned not null, mask int unsigned not null ) "); echo "Adding the useremail table to store email preferencesChanges are now being done on the user table.
query("ALTER TABLE " . TABLE_PREFIX . "user ADD usedst BOOL NOT NULL"); echo "Adding user.usedst, a daylight savings time optionMinor, miscellaneous modifications are now being performed on database tables.
query("DELETE FROM " . TABLE_PREFIX . "search"); echo "Clearing the search table because new features make changes to the way data is stored in this tableTo decrease load times and complex queries, user information is now stored in the bug table. This step will add additional fields for this data and then will populate those same fields.
query("ALTER TABLE " . TABLE_PREFIX . "bug ADD username varchar(255) NOT NULL"); $db->query("ALTER TABLE " . TABLE_PREFIX . "bug ADD lastpostbyname varchar(255) NOT NULL"); $db->query("ALTER TABLE " . TABLE_PREFIX . "bug ADD hiddenlastpostbyname varchar(255) NOT NULL"); echo "Adding bug.username, bug.lastpostbyname, and bug.hiddenlastpostbyname to store cached user name dataIn Bugdar 1.1.0, the bug history feature has been improved significantly. To bring old history messages up to date, processing has to be done. Please wait while historical records are updated.
query("SELECT * FROM " . TABLE_PREFIX . "history"); foreach ($history as $log) { $matches = array(); if (preg_match('#custom_field([0-9]+?)#i', $log['field'], $matches)) { $db->query("UPDATE " . TABLE_PREFIX . "history SET field = 'custom.field{$matches[1]}' WHERE historyid = $log[historyid]"); } else if (preg_match('#comment ([0-9]+?) (hidden|text)#i', $log['field'], $matches)) { $db->query("UPDATE " . TABLE_PREFIX . "history SET field = 'comment.{$matches[2]}', commentid = {$matches[1]} WHERE historyid = $log[historyid]"); } else if ($log['attachmentid'] != 0) { $db->query("UPDATE " . TABLE_PREFIX . "history SET field = 'attachment.{$log['field']}' WHERE historyid = $log[historyid]"); } else if (!preg_match('#^(comment|attachment)?\.#', $log['field'])) { foreach (array('original', 'changed') AS $array) { if (preg_match('# \(id: ([0-9]+?)\)$#i', $log["$array"], $matches)) { $db->query("UPDATE " . TABLE_PREFIX . "history SET $array = {$matches[1]} WHERE historyid = $log[historyid]"); } else if (preg_match('#user ?id:? ([0-9]+?)#i', $log["$array"], $matches)) { $db->query("UPDATE " . TABLE_PREFIX . "history SET $array = {$matches[1]} WHERE historyid = $log[historyid]"); } $db->query("UPDATE " . TABLE_PREFIX . "history SET field = '.{$log['field']}' WHERE historyid = $log[historyid]"); } } echo "."; } echo " doneIn Bugdar 1.1.0, users can receive email notifications on various bug events. We are now setting the default email settings for all users.
query("SELECT userid FROM " . TABLE_PREFIX . "user"); foreach ($users as $user) { $db->query(" INSERT INTO " . TABLE_PREFIX . "useremail (userid, mask, relation) VALUES ($user[userid], 32, 0), ($user[userid], 320, 1), ($user[userid], 1984, 2), ($user[userid], 64, 4), ($user[userid], 64, 8), ($user[userid], 256, 16 ) "); echo "."; } echo " doneThis step finishes the upgrade by inreasing your version number and then updating other settings.
query("UPDATE " . TABLE_PREFIX . "setting SET value = '1.1.0 Beta 1' WHERE varname = 'trackerversion'"); $db->query("INSERT INTO " . TABLE_PREFIX . "setting (varname, value) VALUES ('syndicateditems', '" . $settings['general']['syndicateditems'][1] . "')"); $db->query("INSERT INTO " . TABLE_PREFIX . "setting (varname, value) VALUES ('hidestatuses', '" . $settings['display']['hidestatuses'][1] . "')"); $db->query("INSERT INTO " . TABLE_PREFIX . "setting (varname, value) VALUES ('defaultsortkey', '" . $settings['display']['defaultsortkey'][1] . "')"); $db->query("INSERT INTO " . TABLE_PREFIX . "setting (varname, value) VALUES ('defaultsortas', '" . $settings['display']['defaultsortas'][1] . "')"); build_settings(); ?> ... done.