summaryrefslogtreecommitdiffstats
path: root/upgrades
diff options
context:
space:
mode:
authoralex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-02-28 12:38:44 +0000
committeralex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-02-28 12:38:44 +0000
commit37bd95902dd4725301c18a98e35f84030a2ab910 (patch)
treefd9ca18d2d57b5f9a362fee958b2b38d95ba4b6e /upgrades
parent865f524c0ce05acbcc119b7883a95ee619416401 (diff)
downloadzabbix-37bd95902dd4725301c18a98e35f84030a2ab910.tar.gz
zabbix-37bd95902dd4725301c18a98e35f84030a2ab910.tar.xz
zabbix-37bd95902dd4725301c18a98e35f84030a2ab910.zip
Fixes of MySQL patches.
git-svn-id: svn://svn.zabbix.com/trunk@3853 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'upgrades')
-rw-r--r--upgrades/dbpatches/1.3/mysql/patch/applications.sql12
-rw-r--r--upgrades/dbpatches/1.3/mysql/patch/hosts.sql2
-rw-r--r--upgrades/dbpatches/1.3/mysql/patch/httptest.sql1
-rw-r--r--upgrades/dbpatches/1.3/mysql/patch/images.sql2
-rw-r--r--upgrades/dbpatches/1.3/mysql/patch/usrgrp.sql2
5 files changed, 10 insertions, 9 deletions
diff --git a/upgrades/dbpatches/1.3/mysql/patch/applications.sql b/upgrades/dbpatches/1.3/mysql/patch/applications.sql
index 9b18bfb7..97ff0845 100644
--- a/upgrades/dbpatches/1.3/mysql/patch/applications.sql
+++ b/upgrades/dbpatches/1.3/mysql/patch/applications.sql
@@ -1,10 +1,10 @@
CREATE TABLE applications_tmp (
- applicationid bigint unsigned NOT NULL auto_increment,
- hostid bigint unsigned DEFAULT '0' NOT NULL,
- name varchar(255) DEFAULT '' NOT NULL,
- templateid bigint unsigned DEFAULT '0' NOT NULL,
- PRIMARY KEY (applicationid)
-) ENGINE=InnoDB ;
+ applicationid bigint unsigned DEFAULT '0' NOT NULL,
+ hostid bigint unsigned DEFAULT '0' NOT NULL,
+ name varchar(255) DEFAULT '' NOT NULL,
+ templateid bigint unsigned DEFAULT '0' NOT NULL,
+ PRIMARY KEY (applicationid)
+) ENGINE=InnoDB;
CREATE INDEX applications_1 on applications_tmp (templateid);
CREATE UNIQUE INDEX applications_2 on applications_tmp (hostid,name);
diff --git a/upgrades/dbpatches/1.3/mysql/patch/hosts.sql b/upgrades/dbpatches/1.3/mysql/patch/hosts.sql
index 4023af58..82bc0b33 100644
--- a/upgrades/dbpatches/1.3/mysql/patch/hosts.sql
+++ b/upgrades/dbpatches/1.3/mysql/patch/hosts.sql
@@ -15,6 +15,6 @@ CREATE TABLE hosts_tmp (
CREATE INDEX hosts_1 on hosts_tmp (host);
CREATE INDEX hosts_2 on hosts_tmp (status);
-insert into hosts_tmp select hostid,host,dns,useip,ip,port,status,disable_until,error,available,errors_from from hosts;
+insert into hosts_tmp select hostid,host,host,useip,ip,port,status,disable_until,error,available,errors_from from hosts;
drop table hosts;
alter table hosts_tmp rename hosts;
diff --git a/upgrades/dbpatches/1.3/mysql/patch/httptest.sql b/upgrades/dbpatches/1.3/mysql/patch/httptest.sql
index e898fa63..9c0cacb5 100644
--- a/upgrades/dbpatches/1.3/mysql/patch/httptest.sql
+++ b/upgrades/dbpatches/1.3/mysql/patch/httptest.sql
@@ -12,6 +12,7 @@ CREATE TABLE httptest (
macros blob DEFAULT '' NOT NULL,
agent varchar(255) DEFAULT '' NOT NULL,
time double(16,4) DEFAULT '0' NOT NULL,
+ error varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (httptestid)
) ENGINE=InnoDB;
CREATE INDEX httptest_httptest_1 on httptest (httptestid);
diff --git a/upgrades/dbpatches/1.3/mysql/patch/images.sql b/upgrades/dbpatches/1.3/mysql/patch/images.sql
index 0beab83d..d8867e1c 100644
--- a/upgrades/dbpatches/1.3/mysql/patch/images.sql
+++ b/upgrades/dbpatches/1.3/mysql/patch/images.sql
@@ -7,6 +7,6 @@ CREATE TABLE images_tmp (
) ENGINE=InnoDB;
CREATE INDEX images_1 on images_tmp (imagetype,name);
-insert into images_tmp select * from images`;
+insert into images_tmp select * from images;
drop table images;
alter table images_tmp rename images;
diff --git a/upgrades/dbpatches/1.3/mysql/patch/usrgrp.sql b/upgrades/dbpatches/1.3/mysql/patch/usrgrp.sql
index 07655751..b9a9b9f6 100644
--- a/upgrades/dbpatches/1.3/mysql/patch/usrgrp.sql
+++ b/upgrades/dbpatches/1.3/mysql/patch/usrgrp.sql
@@ -3,7 +3,7 @@ CREATE TABLE usrgrp_tmp (
name varchar(64) DEFAULT '' NOT NULL,
PRIMARY KEY (usrgrpid)
) ENGINE=InnoDB;
-CREATE INDEX usrgrp_1 on usrgrp (name);
+CREATE INDEX usrgrp_1 on usrgrp_tmp (name);
insert into usrgrp_tmp select * from usrgrp;
drop table usrgrp;