SOURCES: eventum-upgrade.patch (NEW) - handle partial 2.1 database...

glen glen at pld-linux.org
Thu Sep 6 11:50:59 CEST 2007


Author: glen                         Date: Thu Sep  6 09:50:59 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- handle partial 2.1 database update

---- Files affected:
SOURCES:
   eventum-upgrade.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/eventum-upgrade.patch
diff -u /dev/null SOURCES/eventum-upgrade.patch:1.1
--- /dev/null	Thu Sep  6 11:50:59 2007
+++ SOURCES/eventum-upgrade.patch	Thu Sep  6 11:50:54 2007
@@ -0,0 +1,33 @@
+--- eventum-r3374/misc/upgrade/v2.0_to_v2.1/database_changes.php~	2007-09-06 12:10:01.000000000 +0300
++++ eventum-r3374/misc/upgrade/v2.0_to_v2.1/database_changes.php	2007-09-06 12:10:29.649982963 +0300
+@@ -7,8 +7,6 @@
+ $stmts[] = "ALTER TABLE eventum_irc_notice ADD INDEX ino_status (ino_status)";
+ $stmts[] = "ALTER TABLE eventum_issue_custom_field ADD COLUMN icf_value_integer int(11) NULL DEFAULT NULL";
+ $stmts[] = "ALTER TABLE eventum_issue_custom_field ADD COLUMN icf_value_date date NULL DEFAULT NULL";
+-$stmts[] = "ALTER TABLE eventum_custom_field ADD COLUMN fld_close_form tinyint(1) NOT NULL DEFAULT 0";
+-$stmts[] = "ALTER TABLE eventum_custom_field ADD COLUMN fld_close_form_required tinyint(1) NOT NULL DEFAULT 0";
+ 
+ foreach ($stmts as $stmt) {
+     $stmt = str_replace('eventum_', APP_TABLE_PREFIX, $stmt);
+--- /dev/null	2006-03-28 14:00:37.387408000 +0300
++++ eventum-r3374/misc/upgrade/v2.0_to_v2.1/database_changes2.php	2007-09-06 12:10:21.879805496 +0300
+@@ -0,0 +1,19 @@
++<?php
++require_once '/usr/share/eventum/htdocs/init.php';
++require_once(APP_INC_PATH . "db_access.php");
++
++$stmts = array();
++
++$stmts[] = "ALTER TABLE eventum_custom_field ADD COLUMN fld_close_form tinyint(1) NOT NULL DEFAULT 0";
++$stmts[] = "ALTER TABLE eventum_custom_field ADD COLUMN fld_close_form_required tinyint(1) NOT NULL DEFAULT 0";
++
++foreach ($stmts as $stmt) {
++    $stmt = str_replace('eventum_', APP_TABLE_PREFIX, $stmt);
++    $res = $GLOBALS["db_api"]->dbh->query($stmt);
++    if (PEAR::isError($res)) {
++        echo "<pre>";var_dump($res);echo "</pre>";
++        exit(1);
++    }
++}
++?>
++done
================================================================


More information about the pld-cvs-commit mailing list