SOURCES: eventum-upgrade.patch - split upgrade due it's halfway already done

glen glen at pld-linux.org
Mon May 26 18:54:44 CEST 2008


Author: glen                         Date: Mon May 26 16:54:44 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- split upgrade due it's halfway already done

---- Files affected:
SOURCES:
   eventum-upgrade.patch (1.3 -> 1.4) 

---- Diffs:

================================================================
Index: SOURCES/eventum-upgrade.patch
diff -u SOURCES/eventum-upgrade.patch:1.3 SOURCES/eventum-upgrade.patch:1.4
--- SOURCES/eventum-upgrade.patch:1.3	Tue Nov 20 18:21:50 2007
+++ SOURCES/eventum-upgrade.patch	Mon May 26 18:54:38 2008
@@ -74,3 +74,53 @@
 +}
 +?>
 +done
+--- eventum-r3576/misc/upgrade/v2.1.1_to_v2.2/database_changes.php~	2008-05-26 19:47:31.000000000 +0300
++++ eventum-r3576/misc/upgrade/v2.1.1_to_v2.2/database_changes.php	2008-05-26 19:48:28.734422670 +0300
+@@ -17,13 +17,6 @@
+ $stmts[] = "ALTER TABLE eventum_note CHANGE COLUMN not_blocked_message not_full_message longblob NOT NULL";
+ $stmts[] = "ALTER TABLE eventum_note ADD COLUMN not_is_blocked tinyint(1) NOT NULL DEFAULT 0";
+ $stmts[] = "UPDATE eventum_note SET not_is_blocked = 1 WHERE not_full_message != ''";
+-$stmts[] = "ALTER TABLE eventum_issue CHANGE COLUMN iss_res_id iss_res_id int(10) unsigned NULL DEFAULT NULL";
+-$stmts[] = "CREATE TABLE eventum_user_alias (
+-    ual_usr_id int(11) unsigned not null,
+-    ual_email varchar(255),
+-    PRIMARY KEY(ual_usr_id, ual_email),
+-    UNIQUE(ual_email)
+-)";
+ 
+ foreach ($stmts as $stmt) {
+     $stmt = str_replace('eventum_', APP_TABLE_PREFIX, $stmt);
+--- /dev/null	2006-03-28 14:00:37.000000000 +0300
++++ eventum-r3576/misc/upgrade/v2.1.1_to_v2.2/database_changes2.php	2008-05-26 19:48:54.139888911 +0300
+@@ -0,0 +1,31 @@
++<?php
++// avoid setup redirecting us
++define('CONFIG_PATH', '/etc/webapps/eventum');
++
++if (!file_exists(CONFIG_PATH. '/config.php')) {
++	die("Can't find config.php from ". CONFIG_PATH . ". Did you forgot to copy config from old install?");
++}
++
++require_once '/usr/share/eventum/htdocs/init.php';
++require_once APP_INC_PATH . 'db_access.php';
++
++$stmts = array();
++
++$stmts[] = "ALTER TABLE eventum_issue CHANGE COLUMN iss_res_id iss_res_id int(10) unsigned NULL DEFAULT NULL";
++$stmts[] = "CREATE TABLE eventum_user_alias (
++    ual_usr_id int(11) unsigned not null,
++    ual_email varchar(255),
++    PRIMARY KEY(ual_usr_id, ual_email),
++    UNIQUE(ual_email)
++)";
++
++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
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/eventum-upgrade.patch?r1=1.3&r2=1.4&f=u



More information about the pld-cvs-commit mailing list