From 56f041a76f5eafcde79e7d3ccb41142a89b78ff5 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Mon, 21 Aug 2006 22:35:38 +0000 Subject: [PATCH] r1119: Adding upgrade3.php --- docs/schema_changes.sql | 13 ---- install/global.php | 3 +- install/upgrade3.php | 139 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 141 insertions(+), 14 deletions(-) create mode 100644 install/upgrade3.php diff --git a/docs/schema_changes.sql b/docs/schema_changes.sql index ceb334f..9de1d44 100644 --- a/docs/schema_changes.sql +++ b/docs/schema_changes.sql @@ -1,15 +1,2 @@ ## SVN $Id$ -DROP TABLE localization; - -ALTER TABLE language DROP filename; - -ALTER TABLE language CHANGE languagecode langcode VARCHAR(5) NOT NULL; - -ALTER TABLE favourite RENAME favorite; - -ALTER TABLE user CHANGE showcolours showcolors BOOL NULL; - -ALTER TABLE language DROP debug; - -UPDATE usergroup SET permissions = permissions + 33554432 WHERE usergroupid IN (2, 5, 6); diff --git a/install/global.php b/install/global.php index 1081b09..7c948ea 100644 --- a/install/global.php +++ b/install/global.php @@ -75,7 +75,8 @@ $bugsys->datastore = array(); $bugsys->versions = array( '1.0.0' => 1, '1.0.1' => 2, - '1.1.0 Beta 1' => -1 + '1.1.0 Beta 1' => 3, + '1.1.0 Beta 2' => -1 ); // ################################################################### diff --git a/install/upgrade3.php b/install/upgrade3.php new file mode 100644 index 0000000..41951e4 --- /dev/null +++ b/install/upgrade3.php @@ -0,0 +1,139 @@ +in['mark'] == 0) +{ +?> +

Welcome to Bugdar

+ +

This upgrade will take from Bugdar 1.1.0 Beta 1 to Bugdar 1.1.0 Beta 2.

+ +

The following steps will make changes to your database schema so that you can run Bugdar 1.1.0 Beta 2.

+ +

To begin the process, please click the button below.

+in['mark'] == 1) +{ +?> +

Language System Updates

+ +

In Bugdar 1.1.0 Beta 2, the language system was changed to use Gettext. These schema changes reflect that change.

+query("DROP TABLE " . TABLE_PREFIX . "localization"); + + echo "Dropping the strings cache table
\n"; + + $db->query("ALTER TABLE " . TABLE_PREFIX . "language DROP filename"); + + echo "Dropping language.filename
\n"; + + $db->query("ALTER TABLE " . TABLE_PREFIX . "language CHANGE languagecode langcode VARCHAR(5) NOT NULL"); + + echo "Adding language.langcode for the Gettext language code
\n"; + + $db->query("ALTER TABLE " . TABLE_PREFIX . "language DROP debug"); + + echo "Dropping language.debug as language debug mode no longer exists
\n"; +} + +// ################################################################### + +if ($bugsys->in['mark'] == 2) +{ +?> +

English US Changes

+ +

These changes bring the schema into English (US) compliance.

+query("ALTER TABLE " . TABLE_PREFIX . "favourite RENAME " . TABLE_PREFIX . "favorite"); + + echo "Renaming table 'favourite' to 'favorite'
\n"; + + $db->query("ALTER TABLE " . TABLE_PREFIX . "user CHANGE showcolours showcolors BOOL NULL"); + + echo "Renaming user.showcolours to user.showcolors
\n"; +} + +// ################################################################### + +if ($bugsys->in['mark'] == 3) +{ +?> +

Adding New Permission Mask

+ +

Bugdar 1.1.0 Beta 2 introduces a new permission called "canviewownhidden" which enables users to view hidden bugs that they reported. This is being turned on for registered users, developers, and administrators.

+query("UPDATE " . TABLE_PREFIX . "usergroup SET permissions = permissions + 33554432 WHERE usergroupid IN (2, 5, 6)"); + + echo "Increased permission levels
\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.1.0 Beta 2' WHERE varname = 'trackerversion'"); + + build_settings(); + +?> + +... done. + + \ No newline at end of file -- 2.22.5