From d267ba7fe4550f07221f1fea731d4b2d82063038 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 11 Mar 2007 23:33:07 +0000 Subject: [PATCH] r1450: Adding upgrade11.php as the upgrade script from 1.1.5 to 1.2.0b1 --- install/global.php | 3 +- install/upgrade11.php | 173 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 175 insertions(+), 1 deletion(-) create mode 100644 install/upgrade11.php diff --git a/install/global.php b/install/global.php index 77cd0c1..755a29f 100644 --- a/install/global.php +++ b/install/global.php @@ -83,7 +83,8 @@ $bugsys->versions = array( '1.1.2' => 8, '1.1.3' => 9, '1.1.4' => 10, - '1.1.5' => -1 + '1.1.5' => 11, + '1.2.0 Beta 1' => -1 ); // ################################################################### diff --git a/install/upgrade11.php b/install/upgrade11.php new file mode 100644 index 0000000..4564aea --- /dev/null +++ b/install/upgrade11.php @@ -0,0 +1,173 @@ +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. + + \ No newline at end of file -- 2.43.5