diff options
author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-09-14 12:44:51 +0000 |
---|---|---|
committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-09-14 12:44:51 +0000 |
commit | 3a131834335bf51798f2283f48f1aa002821bf44 (patch) | |
tree | b252f7946f8956743783b838e427352fe4a1b0f0 /upgrades/dbpatches | |
parent | 8755f9643aba3cffc5320321618fbe8e7b78b73b (diff) | |
download | zabbix-3a131834335bf51798f2283f48f1aa002821bf44.tar.gz zabbix-3a131834335bf51798f2283f48f1aa002821bf44.tar.xz zabbix-3a131834335bf51798f2283f48f1aa002821bf44.zip |
- 'sql' fixes in 'trunk/frontends/php/popup.php' (Eugene)
- minor fix of 'trunk/src/libs/zbxcommon/misc.c' (Eugene)
- developed SLA calculation periods (Eugene)
- developed flexible update intervals for items (Eugene)
ported r3213 (fix for 'delay_flex' collumn) from 'branches/1.1-lk/'
ported r3202 (flexible update intervals) from 'branches/1.1-lk/'
ported r3207 (SLA calculation periods) from 'branches/1.1-lk/'
git-svn-id: svn://svn.zabbix.com/trunk@3307 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'upgrades/dbpatches')
-rw-r--r-- | upgrades/dbpatches/1.1_1.3/mysql/patch.sql | 19 | ||||
-rw-r--r-- | upgrades/dbpatches/1.1_1.3/oracle/patch.sql | 35 | ||||
-rw-r--r-- | upgrades/dbpatches/1.1_1.3/postgresql/patch.sql | 20 |
3 files changed, 74 insertions, 0 deletions
diff --git a/upgrades/dbpatches/1.1_1.3/mysql/patch.sql b/upgrades/dbpatches/1.1_1.3/mysql/patch.sql index 81e19973..544879ee 100644 --- a/upgrades/dbpatches/1.1_1.3/mysql/patch.sql +++ b/upgrades/dbpatches/1.1_1.3/mysql/patch.sql @@ -120,3 +120,22 @@ alter table users_groups_tmp rename users_groups; -- Ger rid of NULLs alter table sysmaps_elements modify label_location int(1) DEFAULT '0' NOT NULL; + +alter table graphs add graphtype int(2) DEFAULT '0' NOT NULL; +alter table items add delay_flex varchar(255) DEFAULT "" NOT NULL; + +-- +-- Table structure for table 'services_times' +-- + +CREATE TABLE services_times ( + timeid int(4) NOT NULL auto_increment, + serviceid int(4) DEFAULT '0' NOT NULL, + type int(2) DEFAULT '0' NOT NULL, + ts_from int(4) DEFAULT '0' NOT NULL, + ts_to int(4) DEFAULT '0' NOT NULL, + note varchar(255) DEFAULT '' NOT NULL, + PRIMARY KEY (timeid), + UNIQUE (serviceid,type,ts_from,ts_to) +) type=InnoDB; + diff --git a/upgrades/dbpatches/1.1_1.3/oracle/patch.sql b/upgrades/dbpatches/1.1_1.3/oracle/patch.sql index e69de29b..159b427e 100644 --- a/upgrades/dbpatches/1.1_1.3/oracle/patch.sql +++ b/upgrades/dbpatches/1.1_1.3/oracle/patch.sql @@ -0,0 +1,35 @@ + +alter table graphs add graphtype number(2) DEFAULT '0' NOT NULL; +alter table items add delay_flex varchar(255) DEFAULT NULL; + +-- +-- Table structure for table 'services_times' +-- + +CREATE TABLE services_times ( + timeid number(10) NOT NULL auto_increment, + serviceid number(10) DEFAULT '0' NOT NULL, + type number(3) DEFAULT '0' NOT NULL, + ts_from number(10) DEFAULT '0' NOT NULL, + ts_to number(10) DEFAULT '0' NOT NULL, + note varchar(255) DEFAULT NULL, + CONSTRAINT services_times_pk PRIMARY KEY (timeid) +) type=InnoDB; + +CREATE INDEX services_times_servicid on services_times (serviceid); +CREATE UNIQUE INDEX services_times_uniq on services_times (serviceid,type,ts_from,ts_to); + +create sequence services_times_timeid +start with 20000 +increment by 1 +nomaxvalue; + +create trigger services_times +before insert on services_times +for each row +begin + if (:new.timeid is null or :new.timeid = 0) then + select services_times_timeid.nextval into :new.timeid from dual; + end if; +end; +/ diff --git a/upgrades/dbpatches/1.1_1.3/postgresql/patch.sql b/upgrades/dbpatches/1.1_1.3/postgresql/patch.sql index e69de29b..b705ba6c 100644 --- a/upgrades/dbpatches/1.1_1.3/postgresql/patch.sql +++ b/upgrades/dbpatches/1.1_1.3/postgresql/patch.sql @@ -0,0 +1,20 @@ + +alter table graphs add graphtype int2 DEFAULT '0' NOT NULL; +alter table items add delay_flex varchar(255) DEFAULT "" NOT NULL; + +-- +-- Table structure for table 'services_times' +-- + +CREATE TABLE services_times ( + timeid serial, + serviceid int4 DEFAULT '0' NOT NULL, + type int2 DEFAULT '0' NOT NULL, + ts_from int4 DEFAULT '0' NOT NULL, + ts_to int4 DEFAULT '0' NOT NULL, + note varchar(255) DEFAULT '' NOT NULL, + PRIMARY KEY (timeid) +) type=InnoDB; + +CREATE UNIQUE INDEX services_times_uniq on services_times (serviceid,type,ts_from,ts_to); + |