]> git.pld-linux.org Git - packages/eventum.git/blob - eventum-upgrade.patch
1b135152cf7e26ce0abf8ccb228c388d719056c5
[packages/eventum.git] / eventum-upgrade.patch
1 --- eventum-r3374/misc/upgrade/v2.0_to_v2.1/database_changes.php~       2007-09-06 12:10:01.000000000 +0300
2 +++ eventum-r3374/misc/upgrade/v2.0_to_v2.1/database_changes.php        2007-09-06 12:10:29.649982963 +0300
3 @@ -7,9 +7,6 @@
4  $stmts[] = "ALTER TABLE eventum_irc_notice ADD INDEX ino_status (ino_status)";
5  $stmts[] = "ALTER TABLE eventum_issue_custom_field ADD COLUMN icf_value_integer int(11) NULL DEFAULT NULL";
6  $stmts[] = "ALTER TABLE eventum_issue_custom_field ADD COLUMN icf_value_date date NULL DEFAULT NULL";
7 -$stmts[] = "ALTER TABLE eventum_custom_field ADD COLUMN fld_close_form tinyint(1) NOT NULL DEFAULT 0";
8 -$stmts[] = "ALTER TABLE eventum_custom_field ADD COLUMN fld_close_form_required tinyint(1) NOT NULL DEFAULT 0";
9 -$stmts[] = "ALTER TABLE eventum_issue ADD COLUMN iss_customer_contract_id varchar(50) NULL AFTER iss_customer_contact_id";
10  
11  foreach ($stmts as $stmt) {
12      $stmt = str_replace('eventum_', APP_TABLE_PREFIX, $stmt);
13 --- /dev/null   2006-03-28 14:00:37.387408000 +0300
14 +++ eventum-r3374/misc/upgrade/v2.0_to_v2.1/database_changes2.php       2007-09-06 12:10:21.879805496 +0300
15 @@ -0,0 +1,19 @@
16 +<?php
17 +require_once '/usr/share/eventum/htdocs/init.php';
18 +require_once(APP_INC_PATH . "db_access.php");
19 +
20 +$stmts = array();
21 +
22 +$stmts[] = "ALTER TABLE eventum_custom_field ADD COLUMN fld_close_form tinyint(1) NOT NULL DEFAULT 0";
23 +$stmts[] = "ALTER TABLE eventum_custom_field ADD COLUMN fld_close_form_required tinyint(1) NOT NULL DEFAULT 0";
24 +
25 +foreach ($stmts as $stmt) {
26 +    $stmt = str_replace('eventum_', APP_TABLE_PREFIX, $stmt);
27 +    $res = $GLOBALS["db_api"]->dbh->query($stmt);
28 +    if (PEAR::isError($res)) {
29 +        echo "<pre>";var_dump($res);echo "</pre>";
30 +        exit(1);
31 +    }
32 +}
33 +?>
34 +done
35 --- /dev/null   2006-03-28 14:00:37.000000000 +0300
36 +++ eventum-r3374/misc/upgrade/v2.0_to_v2.1/database_changes3.php       2007-11-04 17:40:19.385617634 +0200
37 @@ -0,0 +1,18 @@
38 +<?php
39 +require_once '/usr/share/eventum/htdocs/init.php';
40 +require_once(APP_INC_PATH . "db_access.php");
41 +
42 +$stmts = array();
43 +
44 +$stmts[] = "ALTER TABLE eventum_issue ADD COLUMN iss_customer_contract_id int(11) unsigned AFTER iss_customer_id";
45 +
46 +foreach ($stmts as $stmt) {
47 +    $stmt = str_replace('eventum_', APP_TABLE_PREFIX, $stmt);
48 +    $res = $GLOBALS["db_api"]->dbh->query($stmt);
49 +    if (PEAR::isError($res)) {
50 +        echo "<pre>";var_dump($res);echo "</pre>";
51 +        exit(1);
52 +    }
53 +}
54 +?>
55 +done
56 --- /dev/null   2006-03-28 14:00:37.000000000 +0300
57 +++ eventum-r3374/misc/upgrade/v2.0_to_v2.1/database_changes4.php       2007-11-04 17:40:19.385617634 +0200
58 @@ -0,0 +1,18 @@
59 +<?php
60 +require_once '/usr/share/eventum/htdocs/init.php';
61 +require_once(APP_INC_PATH . "db_access.php");
62 +
63 +$stmts = array();
64 +
65 +$stmts[] = "ALTER TABLE eventum_issue MODIFY COLUMN iss_customer_contract_id varchar(50) NULL";
66 +
67 +foreach ($stmts as $stmt) {
68 +    $stmt = str_replace('eventum_', APP_TABLE_PREFIX, $stmt);
69 +    $res = $GLOBALS["db_api"]->dbh->query($stmt);
70 +    if (PEAR::isError($res)) {
71 +        echo "<pre>";var_dump($res);echo "</pre>";
72 +        exit(1);
73 +    }
74 +}
75 +?>
76 +done
77 --- eventum-r3576/misc/upgrade/v2.1.1_to_v2.2/database_changes.php~     2008-05-26 19:47:31.000000000 +0300
78 +++ eventum-r3576/misc/upgrade/v2.1.1_to_v2.2/database_changes.php      2008-05-26 19:48:28.734422670 +0300
79 @@ -17,13 +17,6 @@
80  $stmts[] = "ALTER TABLE eventum_note CHANGE COLUMN not_blocked_message not_full_message longblob NOT NULL";
81  $stmts[] = "ALTER TABLE eventum_note ADD COLUMN not_is_blocked tinyint(1) NOT NULL DEFAULT 0";
82  $stmts[] = "UPDATE eventum_note SET not_is_blocked = 1 WHERE not_full_message != ''";
83 -$stmts[] = "ALTER TABLE eventum_issue CHANGE COLUMN iss_res_id iss_res_id int(10) unsigned NULL DEFAULT NULL";
84 -$stmts[] = "CREATE TABLE eventum_user_alias (
85 -    ual_usr_id int(11) unsigned not null,
86 -    ual_email varchar(255),
87 -    PRIMARY KEY(ual_usr_id, ual_email),
88 -    UNIQUE(ual_email)
89 -)";
90  
91  foreach ($stmts as $stmt) {
92      $stmt = str_replace('eventum_', APP_TABLE_PREFIX, $stmt);
93 --- /dev/null   2006-03-28 14:00:37.000000000 +0300
94 +++ eventum-r3576/misc/upgrade/v2.1.1_to_v2.2/database_changes2.php     2008-05-26 19:48:54.139888911 +0300
95 @@ -0,0 +1,31 @@
96 +<?php
97 +// avoid setup redirecting us
98 +define('CONFIG_PATH', '/etc/webapps/eventum');
99 +
100 +if (!file_exists(CONFIG_PATH. '/config.php')) {
101 +       die("Can't find config.php from ". CONFIG_PATH . ". Did you forgot to copy config from old install?");
102 +}
103 +
104 +require_once '/usr/share/eventum/htdocs/init.php';
105 +require_once APP_INC_PATH . 'db_access.php';
106 +
107 +$stmts = array();
108 +
109 +$stmts[] = "ALTER TABLE eventum_issue CHANGE COLUMN iss_res_id iss_res_id int(10) unsigned NULL DEFAULT NULL";
110 +$stmts[] = "CREATE TABLE eventum_user_alias (
111 +    ual_usr_id int(11) unsigned not null,
112 +    ual_email varchar(255),
113 +    PRIMARY KEY(ual_usr_id, ual_email),
114 +    UNIQUE(ual_email)
115 +)";
116 +
117 +foreach ($stmts as $stmt) {
118 +    $stmt = str_replace('eventum_', APP_TABLE_PREFIX, $stmt);
119 +    $res = $GLOBALS["db_api"]->dbh->query($stmt);
120 +    if (PEAR::isError($res)) {
121 +        echo "<pre>";var_dump($res);echo "</pre>";
122 +        exit(1);
123 +    }
124 +}
125 +?>
126 +done
This page took 0.028885 seconds and 3 git commands to generate.