From 901b9d2bd5c402e45526e151604afd119c6e0ec1 Mon Sep 17 00:00:00 2001
From: alex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082>
Date: Fri, 22 Jun 2007 18:12:58 +0000
Subject:  - fixed PostgreSQL upgrade patch (Alexei)

git-svn-id: svn://svn.zabbix.com/trunk@4353 97f52cf1-0a1b-0410-bd0e-c28be96e8082
---
 upgrades/dbpatches/1.4/postgresql/patch/events.sql | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

(limited to 'upgrades/dbpatches/1.4/postgresql/patch/events.sql')

diff --git a/upgrades/dbpatches/1.4/postgresql/patch/events.sql b/upgrades/dbpatches/1.4/postgresql/patch/events.sql
index 95ef6320..bfd1575d 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/events.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/events.sql
@@ -1,14 +1,15 @@
 CREATE TABLE events (
-	eventid		bigint	DEFAULT '0'	NOT NULL,
-	source		integer	DEFAULT '0'	NOT NULL,
-	sourceid	bigint	DEFAULT '0'	NOT NULL,
-	clock		integer	DEFAULT '0'	NOT NULL,
-	value		integer	DEFAULT '0'	NOT NULL,
-	acknowledged	integer		DEFAULT '0'	NOT NULL,
-	PRIMARY KEY (eventid)
-);
+        eventid         bigint          DEFAULT '0'     NOT NULL,
+        source          integer         DEFAULT '0'     NOT NULL,
+        object          integer         DEFAULT '0'     NOT NULL,
+        objectid                bigint          DEFAULT '0'     NOT NULL,
+        clock           integer         DEFAULT '0'     NOT NULL,
+        value           integer         DEFAULT '0'     NOT NULL,
+        acknowledged            integer         DEFAULT '0'     NOT NULL,
+        PRIMARY KEY (eventid)
+) with OIDS;
 CREATE INDEX events_1 on events (object,objectid,clock);
 CREATE INDEX events_2 on events (clock);
 
-insert into events select alarmid,0,triggerid,clock,value,acknowledged from alarms;
+insert into events select alarmid,0,0,triggerid,clock,value,acknowledged from alarms;
 drop table alarms;
-- 
cgit 

