summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-06-02 08:25:06 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-06-02 08:25:06 +0000
commit2455cb0235f79b6b282a85a8b9b2a82c4f34959c (patch)
tree0bf00de0190c6e1cb8015328804150717a864db1
parent42d53b272f39f3764816e18c9aa18d832a2db1c8 (diff)
downloadzabbix-2455cb0235f79b6b282a85a8b9b2a82c4f34959c.tar.gz
zabbix-2455cb0235f79b6b282a85a8b9b2a82c4f34959c.tar.xz
zabbix-2455cb0235f79b6b282a85a8b9b2a82c4f34959c.zip
- added table escalation_rules (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@1805 97f52cf1-0a1b-0410-bd0e-c28be96e8082
-rw-r--r--ChangeLog1
-rw-r--r--create/mysql/schema.sql13
-rw-r--r--create/postgresql/schema.sql13
-rw-r--r--upgrades/dbpatches/1.1alpha10_to_1.1alpha11/mysql/patch.sql13
-rw-r--r--upgrades/dbpatches/1.1alpha10_to_1.1alpha11/postgresql/patch.sql13
5 files changed, 53 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index dd157922..fce7db84 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
Changes for 1.1alpha11:
+ - added table escalation_rules (Alexei)
- fixed parameter of strncpy() in active.c (Alexei)
- added column screens_items.rowspan (Alexei)
- support of rowspan in screens (Alexei)
diff --git a/create/mysql/schema.sql b/create/mysql/schema.sql
index ee76195e..b074351f 100644
--- a/create/mysql/schema.sql
+++ b/create/mysql/schema.sql
@@ -626,6 +626,19 @@ CREATE TABLE escalations (
) type=InnoDB;
--
+-- Table structure for table 'escalation_rules'
+--
+
+CREATE TABLE escalation_rules (
+ ruleid int(4) NOT NULL auto_increment,
+ escalationid int(4) DEFAULT '0' NOT NULL,
+ level int(4) DEFAULT '0' NOT NULL,
+ actiontype int(4) DEFAULT '0' NOT NULL,
+ PRIMARY KEY (ruleid),
+ KEY (escalationid)
+) type=InnoDB;
+
+--
-- Table structure for table 'hosts_templates'
--
diff --git a/create/postgresql/schema.sql b/create/postgresql/schema.sql
index e1526873..6fe43a7c 100644
--- a/create/postgresql/schema.sql
+++ b/create/postgresql/schema.sql
@@ -631,6 +631,19 @@ CREATE TABLE escalations (
CREATE UNIQUE INDEX escalations_name on escalations (name);
--
+-- Table structure for table 'escalation_rules'
+--
+
+CREATE TABLE escalation_rules (
+ ruleid serial,
+ escalationid int4 DEFAULT '0' NOT NULL,
+ level int4 DEFAULT '0' NOT NULL,
+ actiontype int4 DEFAULT '0' NOT NULL,
+ PRIMARY KEY (ruleid),
+ FOREIGN KEY (escalationid) REFERENCES escalations
+);
+
+--
-- Table structure for table 'hosts_templates'
--
diff --git a/upgrades/dbpatches/1.1alpha10_to_1.1alpha11/mysql/patch.sql b/upgrades/dbpatches/1.1alpha10_to_1.1alpha11/mysql/patch.sql
index 6d704c4d..a0c3a809 100644
--- a/upgrades/dbpatches/1.1alpha10_to_1.1alpha11/mysql/patch.sql
+++ b/upgrades/dbpatches/1.1alpha10_to_1.1alpha11/mysql/patch.sql
@@ -1 +1,14 @@
alter table screens_items add rowspan int(4) DEFAULT '0' NOT NULL;
+
+--
+-- Table structure for table 'escalation_rules'
+--
+
+CREATE TABLE escalation_rules (
+ ruleid int(4) NOT NULL auto_increment,
+ escalationid int(4) DEFAULT '0' NOT NULL,
+ level int(4) DEFAULT '0' NOT NULL,
+ actiontype int(4) DEFAULT '0' NOT NULL,
+ PRIMARY KEY (ruleid),
+ KEY (escalationid)
+) type=InnoDB;
diff --git a/upgrades/dbpatches/1.1alpha10_to_1.1alpha11/postgresql/patch.sql b/upgrades/dbpatches/1.1alpha10_to_1.1alpha11/postgresql/patch.sql
index 9a29f520..d3c1a151 100644
--- a/upgrades/dbpatches/1.1alpha10_to_1.1alpha11/postgresql/patch.sql
+++ b/upgrades/dbpatches/1.1alpha10_to_1.1alpha11/postgresql/patch.sql
@@ -1 +1,14 @@
alter table screens_items add rowspan int4 DEFAULT '0' NOT NULL;
+
+--
+-- Table structure for table 'escalation_rules'
+--
+
+CREATE TABLE escalation_rules (
+ ruleid serial,
+ escalationid int4 DEFAULT '0' NOT NULL,
+ level int4 DEFAULT '0' NOT NULL,
+ actiontype int4 DEFAULT '0' NOT NULL,
+ PRIMARY KEY (ruleid),
+ FOREIGN KEY (escalationid) REFERENCES escalations
+);