r1518: Moving the changes from schema_changes.sql to the new upgrade12.php
authorRobert Sesek <rsesek@bluestatic.org>
Mon, 19 Mar 2007 18:20:19 +0000 (18:20 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Mon, 19 Mar 2007 18:20:19 +0000 (18:20 +0000)
docs/schema_changes.sql
install/global.php
install/upgrade12.php [new file with mode: 0644]

index 6a412635558f5cd74b65e99c32806f72880d3b29..9de1d44968b68dc784bdae5bbcdbaebd5dbff705 100644 (file)
@@ -1,3 +1,2 @@
 ## SVN $Id$
 
-ALTER TABLE user ADD groupids TEXT NULL DEFAULT '';
index 4d3745c41ab5997d57e7c88eecf8c70b365d05f2..aade0fd14a3601dfa951f50f5c2c25975b434426 100644 (file)
@@ -84,7 +84,8 @@ $bugsys->versions = array(
        '1.1.3'                                         => 9,
        '1.1.4'                                         => 10,
        '1.1.5'                                         => 11,
-       '1.2.0 Beta 1'                          => -1
+       '1.2.0 Beta 1'                          => 12,
+       '1.2.0 Beta 2'                          => -1
 );
 
 // ###################################################################
diff --git a/install/upgrade12.php b/install/upgrade12.php
new file mode 100644 (file)
index 0000000..22909ed
--- /dev/null
@@ -0,0 +1,88 @@
+<?php
+/*=====================================================================*\
+|| ###################################################################
+|| # Bugdar [#]version[#]
+|| # Copyright ©2002-[#]year[#] Blue Static
+|| #
+|| # This program is free software; you can redistribute it and/or modify
+|| # it under the terms of the GNU General Public License as published by
+|| # the Free Software Foundation; version [#]gpl[#] of the License.
+|| #
+|| # This program is distributed in the hope that it will be useful, but
+|| # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+|| # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+|| # more details.
+|| #
+|| # You should have received a copy of the GNU General Public License along
+|| # with this program; if not, write to the Free Software Foundation, Inc.,
+|| # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+|| ###################################################################
+\*=====================================================================*/
+
+define('STOP_MARK', 2);
+define('ACTIVE_SITE', 'upgrade12.php');
+
+require_once('./global.php');
+require_once('./includes/functions_datastore.php');
+
+page_start();
+
+// ###################################################################
+
+if ($bugsys->in['mark'] == 0)
+{
+?>
+<h1>Welcome to Bugdar</h1>
+
+<p>This upgrade will take from Bugdar 1.2.0 Beta 1 to Bugdar 1.2.0 Beta 2.</p>
+
+<p>To begin the process, please click the button below.</p>
+<?php
+}
+
+// ###################################################################
+
+if ($bugsys->in['mark'] == 1)
+{
+?>
+<h1>Schema Updates</h1>
+
+<p>To support multiple usergroups per user, a small addition of the groupids field must be made.</p>
+<?php
+
+       $db->query("ALTER TABLE " . TABLE_PREFIX . "user ADD groupids TEXT NULL");
+}
+
+// ###################################################################
+
+if ($bugsys->in['mark'] == 2)
+{
+?>
+<h1>Version Number Change</h1>
+
+<p>This step finishes the upgrade by inreasing your version number.</p>
+
+<?php
+       
+       $db->query("UPDATE " . TABLE_PREFIX . "setting SET value = '1.2.0 Beta 2' WHERE varname = 'trackerversion'");
+       
+       build_settings();
+       
+?>
+
+... done.
+
+<?php
+}
+
+// ###################################################################
+
+page_end();
+
+/*=====================================================================*\
+|| ###################################################################
+|| # $HeadURL$
+|| # $Id$
+|| ###################################################################
+\*=====================================================================*/
+?>
\ No newline at end of file