summaryrefslogtreecommitdiffstats
path: root/upgrades/dbpatches
diff options
context:
space:
mode:
authoralex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-06-29 11:35:14 +0000
committeralex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-06-29 11:35:14 +0000
commitaa6da2c6adf4206387902ae606178b77da431c5b (patch)
treea24776346d9bf20be86a29bb23085d2998921ba1 /upgrades/dbpatches
parent96429a66214858603fff8b687dc777ab1e366ef7 (diff)
downloadzabbix-aa6da2c6adf4206387902ae606178b77da431c5b.tar.gz
zabbix-aa6da2c6adf4206387902ae606178b77da431c5b.tar.xz
zabbix-aa6da2c6adf4206387902ae606178b77da431c5b.zip
- fixed of PostgreSQL database upgrade schema (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@4391 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'upgrades/dbpatches')
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/actions.sql4
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/hosts_groups.sql6
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/hosts_templates.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/items_applications.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/profiles.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/trigger_depends.sql4
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/users_groups.sql2
7 files changed, 11 insertions, 11 deletions
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/actions.sql b/upgrades/dbpatches/1.4/postgresql/patch/actions.sql
index 76aa4f2c..15cbbd0f 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/actions.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/actions.sql
@@ -1,5 +1,5 @@
CREATE TABLE actions_tmp (
- actionid bigintd DEFAULT '0' NOT NULL,
+ actionid bigint DEFAULT '0' NOT NULL,
name varchar(255) DEFAULT '' NOT NULL,
eventsource integer DEFAULT '0' NOT NULL,
evaltype integer DEFAULT '0' NOT NULL,
@@ -27,4 +27,4 @@ update operations set longdata=scripts_tmp where operationtype=1;
alter table operations drop scripts_tmp;
drop table actions;
-alter table actions_tmp rename actions;
+alter table actions_tmp rename to actions;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/hosts_groups.sql b/upgrades/dbpatches/1.4/postgresql/patch/hosts_groups.sql
index 4bb09231..11bdebc4 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/hosts_groups.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/hosts_groups.sql
@@ -4,11 +4,11 @@ CREATE TABLE hosts_groups_tmp (
groupid bigint DEFAULT '0' NOT NULL,
PRIMARY KEY (hostgroupid)
) with OIDS;
-CREATE INDEX hosts_groups_groups_1 on hosts_groups_tmp (hostid,groupid);
+CREATE INDEX hosts_groups_tmp_1 on hosts_groups_tmp (hostid,groupid);
insert into hosts_groups_tmp select NULL,hostid,groupid from hosts_groups;
drop table hosts_groups;
-alter table hosts_groups_tmp rename hosts_groups;
+alter table hosts_groups_tmp rename to hosts_groups;
CREATE TABLE hosts_groups_tmp (
@@ -17,7 +17,7 @@ CREATE TABLE hosts_groups_tmp (
groupid bigint DEFAULT '0' NOT NULL,
PRIMARY KEY (hostgroupid)
) with OIDS;
-CREATE INDEX hosts_groups_groups_1 on hosts_groups_tmp (hostid,groupid);
+CREATE INDEX hosts_groups_1 on hosts_groups_tmp (hostid,groupid);
insert into hosts_groups_tmp select * from hosts_groups;
drop table hosts_groups;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/hosts_templates.sql b/upgrades/dbpatches/1.4/postgresql/patch/hosts_templates.sql
index fa1cb9a2..02ef63d6 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/hosts_templates.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/hosts_templates.sql
@@ -4,7 +4,7 @@ CREATE TABLE hosts_templates_tmp (
templateid bigint DEFAULT '0' NOT NULL,
PRIMARY KEY (hosttemplateid)
) with OIDS;
-CREATE UNIQUE INDEX hosts_templates_1 on hosts_templates_tmp (hostid,templateid);
+CREATE UNIQUE INDEX hosts_templates_tmp_1 on hosts_templates_tmp (hostid,templateid);
insert into hosts_templates_tmp select NULL,hostid,templateid from hosts_templates;
drop table hosts_templates;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/items_applications.sql b/upgrades/dbpatches/1.4/postgresql/patch/items_applications.sql
index da86eefd..f16ccc3e 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/items_applications.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/items_applications.sql
@@ -4,7 +4,7 @@ CREATE TABLE items_applications_tmp (
itemid bigint DEFAULT '0' NOT NULL,
PRIMARY KEY (itemappid)
) with OIDS;
-CREATE INDEX items_applications_1 on items_applications_tmp (applicationid,itemid);
+CREATE INDEX items_applications_tmp_1 on items_applications_tmp (applicationid,itemid);
insert into items_applications_tmp select NULL,applicationid,itemid from items_applications;
drop table items_applications;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/profiles.sql b/upgrades/dbpatches/1.4/postgresql/patch/profiles.sql
index 02a1d2b8..470d3415 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/profiles.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/profiles.sql
@@ -6,7 +6,7 @@ CREATE TABLE profiles_tmp (
valuetype integer DEFAULT 0 NOT NULL,
PRIMARY KEY (profileid)
) with OIDS;
-CREATE UNIQUE INDEX profiles_1 on profiles_tmp (userid,idx);
+CREATE UNIQUE INDEX profiles_tmp_1 on profiles_tmp (userid,idx);
insert into profiles_tmp select NULL,userid,idx,value,valuetype from profiles;
drop table profiles;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/trigger_depends.sql b/upgrades/dbpatches/1.4/postgresql/patch/trigger_depends.sql
index ed2090ab..f771b17b 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/trigger_depends.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/trigger_depends.sql
@@ -4,8 +4,8 @@ CREATE TABLE trigger_depends_tmp (
triggerid_up bigint DEFAULT '0' NOT NULL,
PRIMARY KEY (triggerdepid)
) with OIDS;
-CREATE INDEX trigger_depends_1 on trigger_depends_tmp (triggerid_down,triggerid_up);
-CREATE INDEX trigger_depends_2 on trigger_depends_tmp (triggerid_up);
+CREATE INDEX trigger_depends_tmp_1 on trigger_depends_tmp (triggerid_down,triggerid_up);
+CREATE INDEX trigger_depends_tmp_2 on trigger_depends_tmp (triggerid_up);
insert into trigger_depends_tmp select NULL,triggerid_down,triggerid_up from trigger_depends;
drop table trigger_depends;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/users_groups.sql b/upgrades/dbpatches/1.4/postgresql/patch/users_groups.sql
index 6607de69..a16a6ea2 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/users_groups.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/users_groups.sql
@@ -4,7 +4,7 @@ CREATE TABLE users_groups_tmp (
userid bigint DEFAULT '0' NOT NULL,
PRIMARY KEY (id)
) with OIDS;
-CREATE INDEX users_groups_1 on users_groups_tmp (usrgrpid,userid);
+CREATE INDEX users_groups_tmp_1 on users_groups_tmp (usrgrpid,userid);
insert into users_groups_tmp select NULL,usrgrpid,userid from users_groups;
drop table users_groups;