~ubuntu-dev/ubuntu/lucid/zabbix/lucid-201002110857

« back to all changes in this revision

Viewing changes to upgrades/dbpatches/1.1beta4_to_1.1beta5/postgresql/patch.sql

  • Committer: Bazaar Package Importer
  • Author(s): Michael Ablassmeier
  • Date: 2007-07-02 09:06:51 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070702090651-8l6fl3fjw9rh6l2u
Tags: 1:1.4.1-2
Add patch from SVN in order to fix Incorrect processing of character '%'
in user parameters and remote commands.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
alter table screens_items  add elements         int4            DEFAULT '25' NOT NULL;
2
 
 
3
 
alter table hosts_templates drop screens;
4
 
alter table hosts_templates drop actions;
5
 
 
6
 
--
7
 
--
8
 
 
9
 
CREATE TABLE conditions (
10
 
  conditionid           serial,
11
 
  actionid              int4            DEFAULT '0' NOT NULL,
12
 
  conditiontype         int4            DEFAULT '0' NOT NULL,
13
 
  operator              int1            DEFAULT '0' NOT NULL,
14
 
  value                 varchar(255)    DEFAULT '' NOT NULL,
15
 
  PRIMARY KEY (conditionid),
16
 
  KEY (actionid)
17
 
) type=InnoDB;
18
 
 
19
 
insert into conditions (actionid, conditiontype, operator, value)
20
 
select actionid, 2, 0, triggerid from actions where scope=0;
21
 
 
22
 
insert into conditions (actionid, conditiontype, operator, value)
23
 
select actionid, 1, 0, triggerid from actions where scope=1;
24
 
 
25
 
insert into conditions (actionid, conditiontype, operator, value)
26
 
select actionid, 5, 0, '0' from actions where good in (0,2);
27
 
 
28
 
insert into conditions (actionid, conditiontype, operator, value)
29
 
select actionid, 5, 0, '1' from actions where good in (1,2);
30
 
 
31
 
insert into conditions (actionid, conditiontype, operator, value)
32
 
select actionid, 4, 5, severity from actions where scope in (1,2);
33
 
 
34
 
alter table actions drop triggerid;
35
 
alter table actions drop scope;
36
 
alter table actions drop good;
37
 
alter table actions drop severity;
38
 
 
39
 
alter table actions add  source                 int2            DEFAULT '0' NOT NULL;
40
 
alter table actions add  actiontype             int2            DEFAULT '0' NOT NULL;
41
 
 
42
 
update actions set message="{TRIGGER.NAME}: {STATUS}" where message="*Automatically generated*";
43
 
update actions set subject="{TRIGGER.NAME}: {STATUS}" where subject="*Automatically generated*";