summaryrefslogtreecommitdiffstats
path: root/upgrades
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2001-06-19 14:15:52 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2001-06-19 14:15:52 +0000
commiteb7a2dd83498fa83ad44c7da01362dba10c6d0f4 (patch)
tree8e94ac978cdc0a697d7daff7fb1bcf8eeb04b17b /upgrades
parent1532d158e6ffe62b16b2f78aa9a0121051e16fd3 (diff)
downloadzabbix-eb7a2dd83498fa83ad44c7da01362dba10c6d0f4.tar.gz
zabbix-eb7a2dd83498fa83ad44c7da01362dba10c6d0f4.tar.xz
zabbix-eb7a2dd83498fa83ad44c7da01362dba10c6d0f4.zip
Added columns items.snmp_oid and items.snmp_community.
git-svn-id: svn://svn.zabbix.com/trunk@86 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'upgrades')
-rw-r--r--upgrades/dbpatches/1.0alpha3_to_1.0alpha4/mysql/patch.sql11
-rw-r--r--upgrades/dbpatches/1.0alpha3_to_1.0alpha4/postgresql/patch.sql39
-rw-r--r--upgrades/dbpatches/1.0alpha4_to_1.0alpha5/mysql/patch.sql3
-rw-r--r--upgrades/dbpatches/1.0alpha4_to_1.0alpha5/postgresql/patch.sql3
4 files changed, 54 insertions, 2 deletions
diff --git a/upgrades/dbpatches/1.0alpha3_to_1.0alpha4/mysql/patch.sql b/upgrades/dbpatches/1.0alpha3_to_1.0alpha4/mysql/patch.sql
index 1a050804..0f9c0aa5 100644
--- a/upgrades/dbpatches/1.0alpha3_to_1.0alpha4/mysql/patch.sql
+++ b/upgrades/dbpatches/1.0alpha3_to_1.0alpha4/mysql/patch.sql
@@ -1 +1,10 @@
-alter table items add type int(4) DEFAULT '0' NOT NULL;
+alter table items_template drop platformid;
+alter table hosts drop platformid;
+
+drop table platforms;
+
+alter table media add key (userid);
+alter table actions add key (triggerid);
+alter table triggers add key (istrue);
+alter table items add key (nextcheck);
+alter table items add key (status);
diff --git a/upgrades/dbpatches/1.0alpha3_to_1.0alpha4/postgresql/patch.sql b/upgrades/dbpatches/1.0alpha3_to_1.0alpha4/postgresql/patch.sql
index 25362d05..46580491 100644
--- a/upgrades/dbpatches/1.0alpha3_to_1.0alpha4/postgresql/patch.sql
+++ b/upgrades/dbpatches/1.0alpha3_to_1.0alpha4/postgresql/patch.sql
@@ -1 +1,38 @@
-alter table items add type int4 DEFAULT '0' NOT NULL;
+-- Drop column "platformid" from items_template
+
+CREATE TABLE temp AS SELECT itemtemplateid,description,key_,delay from items_template;
+
+DROP TABLE items_template;
+
+CREATE TABLE items_template (
+ itemtemplateid int4 NOT NULL,
+ description varchar(255) DEFAULT '' NOT NULL,
+ key_ varchar(64) DEFAULT '' NOT NULL,
+ delay int4 DEFAULT '0' NOT NULL,
+ PRIMARY KEY (itemtemplateid)
+);
+
+INSERT INTO items_template SELECT * FROM temp;
+DROP TABLE temp;
+
+-- Drop column "platformid" from hosts
+
+create table temp as select hostid,host,port,status from hosts;
+
+drop table hosts;
+
+CREATE TABLE hosts (
+ hostid int default nextval('hosts_hostid_seq'),
+ host varchar(64) DEFAULT '' NOT NULL,
+ port int4 DEFAULT '0' NOT NULL,
+ status int4 DEFAULT '0' NOT NULL,
+ PRIMARY KEY (hostid)
+);
+
+INSERT INTO hosts SELECT * FROM temp;
+DROP TABLE temp;
+drop table platforms;
+
+CREATE INDEX triggers_istrue on triggers (istrue);
+CREATE INDEX items_nextcheck on items (nextcheck);
+CREATE INDEX items_status on items (status);
diff --git a/upgrades/dbpatches/1.0alpha4_to_1.0alpha5/mysql/patch.sql b/upgrades/dbpatches/1.0alpha4_to_1.0alpha5/mysql/patch.sql
new file mode 100644
index 00000000..82ae8dce
--- /dev/null
+++ b/upgrades/dbpatches/1.0alpha4_to_1.0alpha5/mysql/patch.sql
@@ -0,0 +1,3 @@
+alter table items add type int(4) DEFAULT '0' NOT NULL;
+alter table items add snmp_community varchar(64) DEFAULT '' NOT NULL;
+alter table items add snmp_oid varchar(255) DEFAULT '' NOT NULL;
diff --git a/upgrades/dbpatches/1.0alpha4_to_1.0alpha5/postgresql/patch.sql b/upgrades/dbpatches/1.0alpha4_to_1.0alpha5/postgresql/patch.sql
new file mode 100644
index 00000000..15f37117
--- /dev/null
+++ b/upgrades/dbpatches/1.0alpha4_to_1.0alpha5/postgresql/patch.sql
@@ -0,0 +1,3 @@
+alter table items add type int4 DEFAULT '0' NOT NULL;
+alter table items add snmp_community varchar(64) DEFAULT '' NOT NULL;
+alter table items add snmp_oid varchar(255) DEFAULT '' NOT NULL;