summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-06-22 18:12:58 +0000
committeralex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-06-22 18:12:58 +0000
commit901b9d2bd5c402e45526e151604afd119c6e0ec1 (patch)
tree94de1db7561d6cfe82b41cbc803011a2ab932eb0
parentf4af73c3a3b19f6f850c2eda0717272ca9b24001 (diff)
downloadzabbix-901b9d2bd5c402e45526e151604afd119c6e0ec1.tar.gz
zabbix-901b9d2bd5c402e45526e151604afd119c6e0ec1.tar.xz
zabbix-901b9d2bd5c402e45526e151604afd119c6e0ec1.zip
- fixed PostgreSQL upgrade patch (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@4353 97f52cf1-0a1b-0410-bd0e-c28be96e8082
-rw-r--r--ChangeLog1
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/acknowledges.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/actions.sql4
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/alerts.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/applications.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/auditlog.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/conditions.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/config.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/dchecks.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/dhosts.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/drules.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/dservices.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/events.sql19
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/functions.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/graphs.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/graphs_items.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/groups.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/help_items.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/history.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/history_log.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/history_str.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/history_str_sync.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/history_sync.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/history_text.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/history_uint.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/history_uint_sync.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/hosts.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/hosts_groups.sql4
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/hosts_profiles.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/hosts_templates.sql4
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/housekeeper.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/httpstep.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/httpstepitem.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/httptest.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/httptestitem.sql3
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/ids.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/images.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/items.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/items_applications.sql4
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/mappings.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/media.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/media_type.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/node_cksum.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/node_configlog.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/nodes.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/profiles.sql4
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/rights.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/screens.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/screens_items.sql4
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/service_alarms.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/services.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/services_links.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/services_times.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/sessions.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/slides.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/slideshows.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/sysmaps.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/sysmaps_elements.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/sysmaps_links.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/trends.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/trigger_depends.sql4
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/triggers.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/users.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/users_groups.sql4
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/usrgrp.sql2
-rw-r--r--upgrades/dbpatches/1.4/postgresql/patch/valuemaps.sql2
66 files changed, 83 insertions, 82 deletions
diff --git a/ChangeLog b/ChangeLog
index df5ca23b..d78c96f5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@ Changes for 1.5:
Changes for 1.4.1:
+ - fixed PostgreSQL upgrade patch (Alexei)
- added inter-node exchange of item's next/last check/value (Alexei)
- added loop protection in selection of slave nodes (Alexei)
- change delimiter for DM data transfers to 0xFF (Alexei)
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/acknowledges.sql b/upgrades/dbpatches/1.4/postgresql/patch/acknowledges.sql
index 7846291f..9cf41d86 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/acknowledges.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/acknowledges.sql
@@ -5,7 +5,7 @@ CREATE TABLE acknowledges_tmp (
clock integer DEFAULT '0' NOT NULL,
message varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (acknowledgeid)
-);
+) with OIDS;
CREATE INDEX acknowledges_1 on acknowledges_tmp (userid);
CREATE INDEX acknowledges_2 on acknowledges_tmp (eventid);
CREATE INDEX acknowledges_3 on acknowledges_tmp (clock);
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/actions.sql b/upgrades/dbpatches/1.4/postgresql/patch/actions.sql
index 9f45bd08..76aa4f2c 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/actions.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/actions.sql
@@ -5,7 +5,7 @@ CREATE TABLE actions_tmp (
evaltype integer DEFAULT '0' NOT NULL,
status integer DEFAULT '0' NOT NULL,
PRIMARY KEY (actionid)
-);
+) with OIDS;
CREATE TABLE operations (
operationid bigint DEFAULT '0' NOT NULL,
@@ -17,7 +17,7 @@ CREATE TABLE operations (
longdata text DEFAULT '' NOT NULL,
scripts_tmp text DEFAULT '' NOT NULL,
PRIMARY KEY (operationid)
-);
+) with OIDS;
CREATE INDEX operations_1 on operations (actionid);
insert into actions_tmp select actionid,actionid,source,0,status from actions;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/alerts.sql b/upgrades/dbpatches/1.4/postgresql/patch/alerts.sql
index 413e0ed0..d60dbe19 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/alerts.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/alerts.sql
@@ -13,7 +13,7 @@ CREATE TABLE alerts_tmp (
error varchar(128) DEFAULT '' NOT NULL,
nextcheck integer DEFAULT '0' NOT NULL,
PRIMARY KEY (alertid)
-);
+) with OIDS;
CREATE INDEX alerts_1 on alerts_tmp (actionid);
CREATE INDEX alerts_2 on alerts_tmp (clock);
CREATE INDEX alerts_3 on alerts_tmp (triggerid);
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/applications.sql b/upgrades/dbpatches/1.4/postgresql/patch/applications.sql
index 13d05bd3..9d0a6f57 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/applications.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/applications.sql
@@ -4,7 +4,7 @@ CREATE TABLE applications_tmp (
name varchar(255) DEFAULT '' NOT NULL,
templateid bigint DEFAULT '0' NOT NULL,
PRIMARY KEY (applicationid)
-);
+) with OIDS;
CREATE INDEX applications_1 on applications_tmp (templateid);
CREATE UNIQUE INDEX applications_2 on applications_tmp (hostid,name);
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/auditlog.sql b/upgrades/dbpatches/1.4/postgresql/patch/auditlog.sql
index a262a3a8..561bec1d 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/auditlog.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/auditlog.sql
@@ -6,7 +6,7 @@ CREATE TABLE auditlog_tmp (
resourcetype integer DEFAULT '0' NOT NULL,
details varchar(128) DEFAULT '0' NOT NULL,
PRIMARY KEY (auditid)
-);
+) with OIDS;
CREATE INDEX auditlog_1 on auditlog_tmp (userid,clock);
CREATE INDEX auditlog_2 on auditlog_tmp (clock);
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/conditions.sql b/upgrades/dbpatches/1.4/postgresql/patch/conditions.sql
index e0f8f834..6edf7e90 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/conditions.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/conditions.sql
@@ -5,7 +5,7 @@ CREATE TABLE conditions_tmp (
operator integer DEFAULT '0' NOT NULL,
value varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (conditionid)
-);
+) with OIDS;
CREATE INDEX conditions_1 on conditions_tmp (actionid);
insert into conditions_tmp select * from conditions;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/config.sql b/upgrades/dbpatches/1.4/postgresql/patch/config.sql
index b7f9e2a6..79388480 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/config.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/config.sql
@@ -6,7 +6,7 @@ CREATE TABLE config_tmp (
work_period varchar(100) DEFAULT '1-5,00:00-24:00' NOT NULL,
alert_usrgrpid bigint DEFAULT '0' NOT NULL,
PRIMARY KEY (configid)
-);
+) with OIDS;
insert into config_tmp select 1,alert_history,alarm_history,refresh_unsupported,work_period,0 from config;
drop table config;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/dchecks.sql b/upgrades/dbpatches/1.4/postgresql/patch/dchecks.sql
index 7e6830e4..b947966b 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/dchecks.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/dchecks.sql
@@ -6,4 +6,4 @@ CREATE TABLE dchecks (
snmp_community varchar(255) DEFAULT '0' NOT NULL,
ports varchar(255) DEFAULT '0' NOT NULL,
PRIMARY KEY (dcheckid)
-);
+) with OIDS;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/dhosts.sql b/upgrades/dbpatches/1.4/postgresql/patch/dhosts.sql
index 37f3649e..d65db628 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/dhosts.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/dhosts.sql
@@ -6,4 +6,4 @@ CREATE TABLE dhosts (
lastup integer DEFAULT '0' NOT NULL,
lastdown integer DEFAULT '0' NOT NULL,
PRIMARY KEY (dhostid)
-);
+) with OIDS;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/drules.sql b/upgrades/dbpatches/1.4/postgresql/patch/drules.sql
index 33a092fc..f0fe7a44 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/drules.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/drules.sql
@@ -6,4 +6,4 @@ CREATE TABLE drules (
nextcheck integer DEFAULT '0' NOT NULL,
status integer DEFAULT '0' NOT NULL,
PRIMARY KEY (druleid)
-);
+) with OIDS;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/dservices.sql b/upgrades/dbpatches/1.4/postgresql/patch/dservices.sql
index 6bf25ca1..f1fd1925 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/dservices.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/dservices.sql
@@ -9,4 +9,4 @@ CREATE TABLE dservices (
lastup integer DEFAULT '0' NOT NULL,
lastdown integer DEFAULT '0' NOT NULL,
PRIMARY KEY (dserviceid)
-);
+) with OIDS;
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;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/functions.sql b/upgrades/dbpatches/1.4/postgresql/patch/functions.sql
index ca5bd668..0812398e 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/functions.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/functions.sql
@@ -6,7 +6,7 @@ CREATE TABLE functions_tmp (
function varchar(12) DEFAULT '' NOT NULL,
parameter varchar(255) DEFAULT '0' NOT NULL,
PRIMARY KEY (functionid)
-);
+) with OIDS;
CREATE INDEX functions_1 on functions_tmp (triggerid);
CREATE INDEX functions_2 on functions_tmp (itemid,function,parameter);
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/graphs.sql b/upgrades/dbpatches/1.4/postgresql/patch/graphs.sql
index 38a6c1a4..bdd119ef 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/graphs.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/graphs.sql
@@ -11,7 +11,7 @@ CREATE TABLE graphs_tmp (
show_triggers integer DEFAULT '1' NOT NULL,
graphtype integer DEFAULT '0' NOT NULL,
PRIMARY KEY (graphid)
-);
+) with OIDS;
CREATE INDEX graphs_graphs_1 on graphs_tmp (name);
insert into graphs_tmp select *,0 from graphs;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/graphs_items.sql b/upgrades/dbpatches/1.4/postgresql/patch/graphs_items.sql
index 5236f0a4..7b199c8a 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/graphs_items.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/graphs_items.sql
@@ -10,7 +10,7 @@ CREATE TABLE graphs_items_tmp (
type integer DEFAULT '0' NOT NULL,
periods_cnt integer DEFAULT '5' NOT NULL,
PRIMARY KEY (gitemid)
-);
+) with OIDS;
insert into graphs_items_tmp select * from graphs_items;
drop table graphs_items;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/groups.sql b/upgrades/dbpatches/1.4/postgresql/patch/groups.sql
index 8a94be71..557788f5 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/groups.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/groups.sql
@@ -2,7 +2,7 @@ CREATE TABLE groups_tmp (
groupid bigint DEFAULT '0' NOT NULL,
name varchar(64) DEFAULT '' NOT NULL,
PRIMARY KEY (groupid)
-);
+) with OIDS;
CREATE INDEX groups_1 on groups_tmp (name);
insert into groups_tmp select * from groups;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/help_items.sql b/upgrades/dbpatches/1.4/postgresql/patch/help_items.sql
index 4cfdf525..87d29659 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/help_items.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/help_items.sql
@@ -3,7 +3,7 @@ CREATE TABLE help_items_tmp (
key_ varchar(255) DEFAULT '' NOT NULL,
description varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (itemtype,key_)
-);
+) with OIDS;
insert into help_items_tmp select * from help_items;
drop table help_items;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/history.sql b/upgrades/dbpatches/1.4/postgresql/patch/history.sql
index aa7a9664..dc2238b0 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/history.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/history.sql
@@ -2,7 +2,7 @@ CREATE TABLE history_tmp (
itemid bigint DEFAULT '0' NOT NULL,
clock integer DEFAULT '0' NOT NULL,
value numeric(16,4) DEFAULT '0.0000' NOT NULL
-);
+) with OIDS;
CREATE INDEX history_1 on history_tmp (itemid,clock);
insert into history_tmp select * from history;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/history_log.sql b/upgrades/dbpatches/1.4/postgresql/patch/history_log.sql
index b00151ee..9d7433c1 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/history_log.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/history_log.sql
@@ -7,7 +7,7 @@ CREATE TABLE history_log_tmp (
severity integer DEFAULT '0' NOT NULL,
value varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (id)
-);
+) with OIDS;
CREATE INDEX history_log_1 on history_log_tmp (itemid,clock);
insert into history_log_tmp select * from history_log;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/history_str.sql b/upgrades/dbpatches/1.4/postgresql/patch/history_str.sql
index 3f083b74..6ec70222 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/history_str.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/history_str.sql
@@ -2,7 +2,7 @@ CREATE TABLE history_str_tmp (
itemid bigint DEFAULT '0' NOT NULL,
clock integer DEFAULT '0' NOT NULL,
value varchar(255) DEFAULT '' NOT NULL
-);
+) with OIDS;
CREATE INDEX history_str_1 on history_str_tmp (itemid,clock);
insert into history_str_tmp select * from history_str;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/history_str_sync.sql b/upgrades/dbpatches/1.4/postgresql/patch/history_str_sync.sql
index 091603fc..662ca1d8 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/history_str_sync.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/history_str_sync.sql
@@ -5,5 +5,5 @@ CREATE TABLE history_str_sync (
clock integer DEFAULT '0' NOT NULL,
value varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (id)
-);
+) with OIDS;
CREATE INDEX history_str_sync_1 on history_str_sync (nodeid,id);
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/history_sync.sql b/upgrades/dbpatches/1.4/postgresql/patch/history_sync.sql
index 237cbcba..e7a6f6c7 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/history_sync.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/history_sync.sql
@@ -5,5 +5,5 @@ CREATE TABLE history_sync (
clock integer DEFAULT '0' NOT NULL,
value numeric(16,4) DEFAULT '0.0000' NOT NULL,
PRIMARY KEY (id)
-);
+) with OIDS;
CREATE INDEX history_sync_1 on history_sync (nodeid,id);
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/history_text.sql b/upgrades/dbpatches/1.4/postgresql/patch/history_text.sql
index 501e5090..dad2810f 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/history_text.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/history_text.sql
@@ -4,7 +4,7 @@ CREATE TABLE history_text_tmp (
clock integer DEFAULT '0' NOT NULL,
value text DEFAULT '' NOT NULL,
PRIMARY KEY (id)
-);
+) with OIDS;
CREATE INDEX history_text_1 on history_text_tmp (itemid,clock);
insert into history_text_tmp select * from history_text;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/history_uint.sql b/upgrades/dbpatches/1.4/postgresql/patch/history_uint.sql
index 942d4d37..120804ac 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/history_uint.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/history_uint.sql
@@ -2,7 +2,7 @@ CREATE TABLE history_uint_tmp (
itemid bigint DEFAULT '0' NOT NULL,
clock integer DEFAULT '0' NOT NULL,
value bigint DEFAULT '0' NOT NULL
-);
+) with OIDS;
CREATE INDEX history_uint_1 on history_uint_tmp (itemid,clock);
insert into history_uint_tmp select * from history_uint;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/history_uint_sync.sql b/upgrades/dbpatches/1.4/postgresql/patch/history_uint_sync.sql
index 369d386a..d11002bd 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/history_uint_sync.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/history_uint_sync.sql
@@ -5,5 +5,5 @@ CREATE TABLE history_uint_sync (
clock integer DEFAULT '0' NOT NULL,
value bigint DEFAULT '0' NOT NULL,
PRIMARY KEY (id)
-);
+) with OIDS;
CREATE INDEX history_uint_sync_1 on history_uint_sync (nodeid,id);
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/hosts.sql b/upgrades/dbpatches/1.4/postgresql/patch/hosts.sql
index 8b633a94..c21106e9 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/hosts.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/hosts.sql
@@ -11,7 +11,7 @@ CREATE TABLE hosts_tmp (
available integer DEFAULT '0' NOT NULL,
errors_from integer DEFAULT '0' NOT NULL,
PRIMARY KEY (hostid)
-);
+) with OIDS;
CREATE INDEX hosts_1 on hosts_tmp (host);
CREATE INDEX hosts_2 on hosts_tmp (status);
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/hosts_groups.sql b/upgrades/dbpatches/1.4/postgresql/patch/hosts_groups.sql
index d8bfe0bf..4bb09231 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/hosts_groups.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/hosts_groups.sql
@@ -3,7 +3,7 @@ CREATE TABLE hosts_groups_tmp (
hostid bigint DEFAULT '0' NOT NULL,
groupid bigint DEFAULT '0' NOT NULL,
PRIMARY KEY (hostgroupid)
-);
+) with OIDS;
CREATE INDEX hosts_groups_groups_1 on hosts_groups_tmp (hostid,groupid);
insert into hosts_groups_tmp select NULL,hostid,groupid from hosts_groups;
@@ -16,7 +16,7 @@ CREATE TABLE hosts_groups_tmp (
hostid bigint DEFAULT '0' NOT NULL,
groupid bigint DEFAULT '0' NOT NULL,
PRIMARY KEY (hostgroupid)
-);
+) with OIDS;
CREATE INDEX hosts_groups_groups_1 on hosts_groups_tmp (hostid,groupid);
insert into hosts_groups_tmp select * from hosts_groups;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/hosts_profiles.sql b/upgrades/dbpatches/1.4/postgresql/patch/hosts_profiles.sql
index e6be1ab9..ce8e1b06 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/hosts_profiles.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/hosts_profiles.sql
@@ -12,7 +12,7 @@ CREATE TABLE hosts_profiles_tmp (
location text DEFAULT '' NOT NULL,
notes text DEFAULT '' NOT NULL,
PRIMARY KEY (hostid)
-);
+) with OIDS;
insert into hosts_profiles_tmp select * from hosts_profiles;
drop table hosts_profiles;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/hosts_templates.sql b/upgrades/dbpatches/1.4/postgresql/patch/hosts_templates.sql
index d42bcf5a..fa1cb9a2 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/hosts_templates.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/hosts_templates.sql
@@ -3,7 +3,7 @@ CREATE TABLE hosts_templates_tmp (
hostid bigint DEFAULT '0' NOT NULL,
templateid bigint DEFAULT '0' NOT NULL,
PRIMARY KEY (hosttemplateid)
-);
+) with OIDS;
CREATE UNIQUE INDEX hosts_templates_1 on hosts_templates_tmp (hostid,templateid);
insert into hosts_templates_tmp select NULL,hostid,templateid from hosts_templates;
@@ -15,7 +15,7 @@ CREATE TABLE hosts_templates_tmp (
hostid bigint DEFAULT '0' NOT NULL,
templateid bigint DEFAULT '0' NOT NULL,
PRIMARY KEY (hosttemplateid)
-);
+) with OIDS;
CREATE UNIQUE INDEX hosts_templates_1 on hosts_templates_tmp (hostid,templateid);
insert into hosts_templates_tmp select * from hosts_templates;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/housekeeper.sql b/upgrades/dbpatches/1.4/postgresql/patch/housekeeper.sql
index bccc8e5f..bd115f08 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/housekeeper.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/housekeeper.sql
@@ -4,7 +4,7 @@ CREATE TABLE housekeeper_tmp (
field varchar(64) DEFAULT '' NOT NULL,
value bigint DEFAULT '0' NOT NULL,
PRIMARY KEY (housekeeperid)
-);
+) with OIDS;
insert into housekeeper_tmp select * from housekeeper;
drop table housekeeper;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/httpstep.sql b/upgrades/dbpatches/1.4/postgresql/patch/httpstep.sql
index 4d0c7630..f0f86342 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/httpstep.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/httpstep.sql
@@ -9,5 +9,5 @@ CREATE TABLE httpstep (
required varchar(255) DEFAULT '' NOT NULL,
status_codes varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (httpstepid)
-);
+) with OIDS;
CREATE INDEX httpstep_httpstep_1 on httpstep (httptestid);
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/httpstepitem.sql b/upgrades/dbpatches/1.4/postgresql/patch/httpstepitem.sql
index c8232b97..7dea595a 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/httpstepitem.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/httpstepitem.sql
@@ -4,5 +4,5 @@ CREATE TABLE httpstepitem (
itemid bigint DEFAULT '0' NOT NULL,
type integer DEFAULT '0' NOT NULL,
PRIMARY KEY (httpstepitemid)
-);
+) with OIDS;
CREATE UNIQUE INDEX httpstepitem_httpstepitem_1 on httpstepitem (httpstepid,itemid);
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/httptest.sql b/upgrades/dbpatches/1.4/postgresql/patch/httptest.sql
index cdaced12..80fa68d6 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/httptest.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/httptest.sql
@@ -14,5 +14,5 @@ CREATE TABLE httptest (
time numeric(16,4) DEFAULT '0' NOT NULL,
error varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (httptestid)
-);
+) with OIDS;
CREATE INDEX httptest_httptest_1 on httptest (httptestid);
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/httptestitem.sql b/upgrades/dbpatches/1.4/postgresql/patch/httptestitem.sql
index 17ffd7c3..9c12b040 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/httptestitem.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/httptestitem.sql
@@ -4,5 +4,4 @@ CREATE TABLE httptestitem (
itemid bigint DEFAULT '0' NOT NULL,
type integer DEFAULT '0' NOT NULL,
PRIMARY KEY (httptestitemid)
-);
-CREATE UNIQUE INDEX httptestitem_httptestitem_1 on httptestitem (httptestid,itemid);
+) with OIDS;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/ids.sql b/upgrades/dbpatches/1.4/postgresql/patch/ids.sql
index 8e49ef0e..98d2bea4 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/ids.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/ids.sql
@@ -4,4 +4,4 @@ CREATE TABLE ids (
field_name varchar(64) DEFAULT '' NOT NULL,
nextid bigint DEFAULT '0' NOT NULL,
PRIMARY KEY (nodeid,table_name,field_name)
-);
+) with OIDS;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/images.sql b/upgrades/dbpatches/1.4/postgresql/patch/images.sql
index 250068ae..22c472f4 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/images.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/images.sql
@@ -4,7 +4,7 @@ CREATE TABLE images_tmp (
name varchar(64) DEFAULT '0' NOT NULL,
image bytea DEFAULT '' NOT NULL,
PRIMARY KEY (imageid)
-);
+) with OIDS;
CREATE INDEX images_1 on images_tmp (imagetype,name);
insert into images_tmp select * from images;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/items.sql b/upgrades/dbpatches/1.4/postgresql/patch/items.sql
index eeb7ecbe..871cf365 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/items.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/items.sql
@@ -34,7 +34,7 @@ CREATE TABLE items_tmp (
delay_flex varchar(255) DEFAULT '' NOT NULL,
params text DEFAULT '' NOT NULL,
PRIMARY KEY (itemid)
-);
+) with OIDS;
CREATE UNIQUE INDEX items_1 on items_tmp (hostid,key_);
CREATE INDEX items_2 on items_tmp (nextcheck);
CREATE INDEX items_3 on items_tmp (status);
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/items_applications.sql b/upgrades/dbpatches/1.4/postgresql/patch/items_applications.sql
index 7852a23d..da86eefd 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/items_applications.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/items_applications.sql
@@ -3,7 +3,7 @@ CREATE TABLE items_applications_tmp (
applicationid bigint DEFAULT '0' NOT NULL,
itemid bigint DEFAULT '0' NOT NULL,
PRIMARY KEY (itemappid)
-);
+) with OIDS;
CREATE INDEX items_applications_1 on items_applications_tmp (applicationid,itemid);
insert into items_applications_tmp select NULL,applicationid,itemid from items_applications;
@@ -15,7 +15,7 @@ CREATE TABLE items_applications_tmp (
applicationid bigint DEFAULT '0' NOT NULL,
itemid bigint DEFAULT '0' NOT NULL,
PRIMARY KEY (itemappid)
-);
+) with OIDS;
CREATE INDEX items_applications_1 on items_applications_tmp (applicationid,itemid);
insert into items_applications_tmp select * from items_applications;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/mappings.sql b/upgrades/dbpatches/1.4/postgresql/patch/mappings.sql
index 8c3d013d..e4b02eaa 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/mappings.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/mappings.sql
@@ -4,7 +4,7 @@ CREATE TABLE mappings_tmp (
value varchar(64) DEFAULT '' NOT NULL,
newvalue varchar(64) DEFAULT '' NOT NULL,
PRIMARY KEY (mappingid)
-);
+) with OIDS;
CREATE INDEX mappings_1 on mappings_tmp (valuemapid);
insert into mappings_tmp select * from mappings;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/media.sql b/upgrades/dbpatches/1.4/postgresql/patch/media.sql
index b931ebe1..98ab27de 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/media.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/media.sql
@@ -7,7 +7,7 @@ CREATE TABLE media_tmp (
severity integer DEFAULT '63' NOT NULL,
period varchar(100) DEFAULT '1-7,00:00-23:59' NOT NULL,
PRIMARY KEY (mediaid)
-);
+) with OIDS;
CREATE INDEX media_1 on media_tmp (userid);
CREATE INDEX media_2 on media_tmp (mediatypeid);
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/media_type.sql b/upgrades/dbpatches/1.4/postgresql/patch/media_type.sql
index 898d2f3a..c70f5553 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/media_type.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/media_type.sql
@@ -10,7 +10,7 @@ CREATE TABLE media_type_tmp (
username varchar(255) DEFAULT '' NOT NULL,
passwd varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (mediatypeid)
-);
+) with OIDS;
insert into media_type_tmp select mediatypeid,type,description,smtp_server,smtp_helo,smtp_email,exec_path,gsm_modem,'','' from media_type;
drop table media_type;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/node_cksum.sql b/upgrades/dbpatches/1.4/postgresql/patch/node_cksum.sql
index f1edfb85..c7c6be89 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/node_cksum.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/node_cksum.sql
@@ -7,5 +7,5 @@ CREATE TABLE node_cksum (
cksumtype integer DEFAULT '0' NOT NULL,
cksum char(32) DEFAULT '' NOT NULL,
PRIMARY KEY (cksumid)
-);
+) with OIDS;
CREATE INDEX node_cksum_cksum_1 on node_cksum (nodeid,tablename,fieldname,recordid,cksumtype);
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/node_configlog.sql b/upgrades/dbpatches/1.4/postgresql/patch/node_configlog.sql
index 4e3fe54c..240a27bd 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/node_configlog.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/node_configlog.sql
@@ -7,6 +7,6 @@ CREATE TABLE node_configlog (
sync_master integer DEFAULT '0' NOT NULL,
sync_slave integer DEFAULT '0' NOT NULL,
PRIMARY KEY (nodeid,conflogid)
-);
+) with OIDS;
CREATE INDEX node_configlog_configlog_1 on node_configlog (conflogid);
CREATE INDEX node_configlog_configlog_2 on node_configlog (nodeid,tablename);
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/nodes.sql b/upgrades/dbpatches/1.4/postgresql/patch/nodes.sql
index 9054c83b..4576949d 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/nodes.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/nodes.sql
@@ -13,4 +13,4 @@ CREATE TABLE nodes (
nodetype integer DEFAULT '0' NOT NULL,
masterid integer DEFAULT '0' NOT NULL,
PRIMARY KEY (nodeid)
-);
+) with OIDS;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/profiles.sql b/upgrades/dbpatches/1.4/postgresql/patch/profiles.sql
index f56a5c0f..02a1d2b8 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/profiles.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/profiles.sql
@@ -5,7 +5,7 @@ CREATE TABLE profiles_tmp (
value varchar(255) DEFAULT '' NOT NULL,
valuetype integer DEFAULT 0 NOT NULL,
PRIMARY KEY (profileid)
-);
+) with OIDS;
CREATE UNIQUE INDEX profiles_1 on profiles_tmp (userid,idx);
insert into profiles_tmp select NULL,userid,idx,value,valuetype from profiles;
@@ -19,7 +19,7 @@ CREATE TABLE profiles_tmp (
value varchar(255) DEFAULT '' NOT NULL,
valuetype integer DEFAULT 0 NOT NULL,
PRIMARY KEY (profileid)
-);
+) with OIDS;
CREATE UNIQUE INDEX profiles_1 on profiles_tmp (userid,idx);
insert into profiles_tmp select * from profiles;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/rights.sql b/upgrades/dbpatches/1.4/postgresql/patch/rights.sql
index 19d72064..0ecddbe1 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/rights.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/rights.sql
@@ -5,7 +5,7 @@ CREATE TABLE rights_tmp (
permission integer DEFAULT '0' NOT NULL,
id bigint,
PRIMARY KEY (rightid)
-);
+) with OIDS;
CREATE INDEX rights_1 on rights_tmp (groupid);
--insert into rights_tmp select rightid,groupid,type::integer,permission,id from rights;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/screens.sql b/upgrades/dbpatches/1.4/postgresql/patch/screens.sql
index f3c42074..effc524a 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/screens.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/screens.sql
@@ -4,7 +4,7 @@ CREATE TABLE screens_tmp (
hsize integer DEFAULT '1' NOT NULL,
vsize integer DEFAULT '1' NOT NULL,
PRIMARY KEY (screenid)
-);
+) with OIDS;
insert into screens_tmp select * from screens;
drop table screens;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/screens_items.sql b/upgrades/dbpatches/1.4/postgresql/patch/screens_items.sql
index d00811a6..52bcbf33 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/screens_items.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/screens_items.sql
@@ -15,7 +15,7 @@ CREATE TABLE screens_items_tmp (
style integer DEFAULT '0' NOT NULL,
url varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (screenitemid)
-);
+) with OIDS;
insert into screens_items_tmp select NULL,screenid,resourcetype,resourceid,width,height,x,y,colspan,rowspan,elements,valign,halign,style,url from screens_items;
drop table screens_items;
@@ -38,7 +38,7 @@ CREATE TABLE screens_items_tmp (
style integer DEFAULT '0' NOT NULL,
url varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (screenitemid)
-);
+) with OIDS;
insert into screens_items_tmp select * from screens_items;
drop table screens_items;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/service_alarms.sql b/upgrades/dbpatches/1.4/postgresql/patch/service_alarms.sql
index f595afab..cdb782bc 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/service_alarms.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/service_alarms.sql
@@ -4,7 +4,7 @@ CREATE TABLE service_alarms_tmp (
clock integer DEFAULT '0' NOT NULL,
value integer DEFAULT '0' NOT NULL,
PRIMARY KEY (servicealarmid)
-);
+) with OIDS;
CREATE INDEX service_alarms_1 on service_alarms_tmp (serviceid,clock);
CREATE INDEX service_alarms_2 on service_alarms_tmp (clock);
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/services.sql b/upgrades/dbpatches/1.4/postgresql/patch/services.sql
index efafc4e5..3a26b069 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/services.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/services.sql
@@ -8,7 +8,7 @@ CREATE TABLE services_tmp (
goodsla numeric(5,2) DEFAULT '99.9' NOT NULL,
sortorder integer DEFAULT '0' NOT NULL,
PRIMARY KEY (serviceid)
-);
+) with OIDS;
insert into services_tmp select * from services;
drop table services;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/services_links.sql b/upgrades/dbpatches/1.4/postgresql/patch/services_links.sql
index 2e5e9253..1cc80bdf 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/services_links.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/services_links.sql
@@ -4,7 +4,7 @@ CREATE TABLE services_links_tmp (
servicedownid bigint DEFAULT '0' NOT NULL,
soft integer DEFAULT '0' NOT NULL,
PRIMARY KEY (linkid)
-);
+) with OIDS;
CREATE INDEX services_links_links_1 on services_links_tmp (servicedownid);
CREATE UNIQUE INDEX services_links_links_2 on services_links_tmp (serviceupid,servicedownid);
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/services_times.sql b/upgrades/dbpatches/1.4/postgresql/patch/services_times.sql
index e9e2e305..9c9e64f0 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/services_times.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/services_times.sql
@@ -6,5 +6,5 @@ CREATE TABLE services_times (
ts_to integer DEFAULT '0' NOT NULL,
note varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (timeid)
-);
+) with OIDS;
CREATE INDEX services_times_times_1 on services_times (serviceid,type,ts_from,ts_to);
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/sessions.sql b/upgrades/dbpatches/1.4/postgresql/patch/sessions.sql
index d9d3d45d..7f96d171 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/sessions.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/sessions.sql
@@ -3,7 +3,7 @@ CREATE TABLE sessions_tmp (
userid bigint DEFAULT '0' NOT NULL,
lastaccess integer DEFAULT '0' NOT NULL,
PRIMARY KEY (sessionid)
-);
+) with OIDS;
insert into sessions_tmp select * from sessions;
drop table sessions;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/slides.sql b/upgrades/dbpatches/1.4/postgresql/patch/slides.sql
index 46783417..f6c1598d 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/slides.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/slides.sql
@@ -5,6 +5,6 @@ CREATE TABLE slides (
step integer DEFAULT '0' NOT NULL,
delay integer DEFAULT '0' NOT NULL,
PRIMARY KEY (slideid)
-);
+) with OIDS;
CREATE INDEX slides_slides_1 on slides (slideshowid);
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/slideshows.sql b/upgrades/dbpatches/1.4/postgresql/patch/slideshows.sql
index ad806da0..8021634a 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/slideshows.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/slideshows.sql
@@ -3,4 +3,4 @@ CREATE TABLE slideshows (
name varchar(255) DEFAULT '' NOT NULL,
delay integer DEFAULT '0' NOT NULL,
PRIMARY KEY (slideshowid)
-);
+) with OIDS;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/sysmaps.sql b/upgrades/dbpatches/1.4/postgresql/patch/sysmaps.sql
index 975530db..ee0f0bca 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/sysmaps.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/sysmaps.sql
@@ -7,7 +7,7 @@ CREATE TABLE sysmaps_tmp (
label_type integer DEFAULT '0' NOT NULL,
label_location integer DEFAULT '0' NOT NULL,
PRIMARY KEY (sysmapid)
-);
+) with OIDS;
CREATE INDEX sysmaps_1 on sysmaps_tmp (name);
insert into sysmaps_tmp select s.sysmapid,s.name,s.width,s.height,i.imageid,s.label_type,s.label_location from sysmaps s,images i where s.background=i.name;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/sysmaps_elements.sql b/upgrades/dbpatches/1.4/postgresql/patch/sysmaps_elements.sql
index 97c2e847..33262181 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/sysmaps_elements.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/sysmaps_elements.sql
@@ -12,7 +12,7 @@ CREATE TABLE sysmaps_elements_tmp (
y integer DEFAULT '0' NOT NULL,
url varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (selementid)
-);
+) with OIDS;
insert into sysmaps_elements_tmp select s.selementid,s.sysmapid,s.elementid,s.elementtype,i1.imageid,i2.imageid,i1.imageid,s.label,s.label_location,s.x,s.y,s.url from sysmaps_elements s,images i1,images i2 where s.icon=i1.name and s.icon_on=i2.name;
drop table sysmaps_elements;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/sysmaps_links.sql b/upgrades/dbpatches/1.4/postgresql/patch/sysmaps_links.sql
index 9ae49130..c02ab669 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/sysmaps_links.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/sysmaps_links.sql
@@ -9,7 +9,7 @@ CREATE TABLE sysmaps_links_tmp (
drawtype_on integer DEFAULT '0' NOT NULL,
color_on varchar(32) DEFAULT 'Red' NOT NULL,
PRIMARY KEY (linkid)
-);
+) with OIDS;
insert into sysmaps_links_tmp select * from sysmaps_links;
drop table sysmaps_links;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/trends.sql b/upgrades/dbpatches/1.4/postgresql/patch/trends.sql
index 7e10db00..6b7113ed 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/trends.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/trends.sql
@@ -6,7 +6,7 @@ CREATE TABLE trends_tmp (
value_avg numeric(16,4) DEFAULT '0.0000' NOT NULL,
value_max numeric(16,4) DEFAULT '0.0000' NOT NULL,
PRIMARY KEY (itemid,clock)
-);
+) with OIDS;
insert into trends_tmp select * from trends;
drop table trends;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/trigger_depends.sql b/upgrades/dbpatches/1.4/postgresql/patch/trigger_depends.sql
index 0a1974db..ed2090ab 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/trigger_depends.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/trigger_depends.sql
@@ -3,7 +3,7 @@ CREATE TABLE trigger_depends_tmp (
triggerid_down bigint DEFAULT '0' NOT NULL,
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);
@@ -16,7 +16,7 @@ CREATE TABLE trigger_depends_tmp (
triggerid_down bigint DEFAULT '0' NOT NULL,
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);
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/triggers.sql b/upgrades/dbpatches/1.4/postgresql/patch/triggers.sql
index 57c348d0..fa1b3323 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/triggers.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/triggers.sql
@@ -12,7 +12,7 @@ CREATE TABLE triggers_tmp (
error varchar(128) DEFAULT '' NOT NULL,
templateid bigint DEFAULT '0' NOT NULL,
PRIMARY KEY (triggerid)
-);
+) with OIDS;
CREATE INDEX triggers_1 on triggers_tmp (status);
CREATE INDEX triggers_2 on triggers_tmp (value);
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/users.sql b/upgrades/dbpatches/1.4/postgresql/patch/users.sql
index b3fe5776..f476910f 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/users.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/users.sql
@@ -10,7 +10,7 @@ CREATE TABLE users_tmp (
refresh integer DEFAULT '30' NOT NULL,
type integer DEFAULT '0' NOT NULL,
PRIMARY KEY (userid)
-);
+) with OIDS;
CREATE INDEX users_1 on users_tmp (alias);
insert into users_tmp select userid,alias,name,surname,passwd,url,autologout,lang,refresh,1 from users;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/users_groups.sql b/upgrades/dbpatches/1.4/postgresql/patch/users_groups.sql
index abe3866b..6607de69 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/users_groups.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/users_groups.sql
@@ -3,7 +3,7 @@ CREATE TABLE users_groups_tmp (
usrgrpid bigint DEFAULT '0' NOT NULL,
userid bigint DEFAULT '0' NOT NULL,
PRIMARY KEY (id)
-);
+) with OIDS;
CREATE INDEX users_groups_1 on users_groups_tmp (usrgrpid,userid);
insert into users_groups_tmp select NULL,usrgrpid,userid from users_groups;
@@ -15,7 +15,7 @@ CREATE TABLE users_groups_tmp (
usrgrpid bigint DEFAULT '0' NOT NULL,
userid bigint DEFAULT '0' NOT NULL,
PRIMARY KEY (id)
-);
+) with OIDS;
CREATE INDEX users_groups_1 on users_groups_tmp (usrgrpid,userid);
insert into users_groups_tmp select * from users_groups;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/usrgrp.sql b/upgrades/dbpatches/1.4/postgresql/patch/usrgrp.sql
index 5ad81ff7..16bc7478 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/usrgrp.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/usrgrp.sql
@@ -2,7 +2,7 @@ CREATE TABLE usrgrp_tmp (
usrgrpid bigint DEFAULT '0' NOT NULL,
name varchar(64) DEFAULT '' NOT NULL,
PRIMARY KEY (usrgrpid)
-);
+) with OIDS;
CREATE INDEX usrgrp_1 on usrgrp_tmp (name);
insert into usrgrp_tmp select * from usrgrp;
diff --git a/upgrades/dbpatches/1.4/postgresql/patch/valuemaps.sql b/upgrades/dbpatches/1.4/postgresql/patch/valuemaps.sql
index addad09c..b4554ef5 100644
--- a/upgrades/dbpatches/1.4/postgresql/patch/valuemaps.sql
+++ b/upgrades/dbpatches/1.4/postgresql/patch/valuemaps.sql
@@ -2,7 +2,7 @@ CREATE TABLE valuemaps_tmp (
valuemapid bigint DEFAULT '0' NOT NULL,
name varchar(64) DEFAULT '' NOT NULL,
PRIMARY KEY (valuemapid)
-);
+) with OIDS;
CREATE INDEX valuemaps_1 on valuemaps_tmp (name);
insert into valuemaps_tmp select * from valuemaps;