summaryrefslogtreecommitdiffstats
path: root/create/postgresql/schema.sql
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-05-03 06:35:28 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-05-03 06:35:28 +0000
commitcff3cc1ef8b6ac526e7968be6a10c09669461be1 (patch)
treecdb8c67a959922a86e98a01b6104f52c3828b786 /create/postgresql/schema.sql
parent50cb63535597c91584f08f6d6f00cfcdbe0dd198 (diff)
downloadzabbix-cff3cc1ef8b6ac526e7968be6a10c09669461be1.tar.gz
zabbix-cff3cc1ef8b6ac526e7968be6a10c09669461be1.tar.xz
zabbix-cff3cc1ef8b6ac526e7968be6a10c09669461be1.zip
- improved 'Latest data' sreen, items grouped by applications (Eugene)
- added applications for hosts (Eugene) git-svn-id: svn://svn.zabbix.com/trunk@2794 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'create/postgresql/schema.sql')
-rw-r--r--create/postgresql/schema.sql29
1 files changed, 28 insertions, 1 deletions
diff --git a/create/postgresql/schema.sql b/create/postgresql/schema.sql
index 854f2450..5df15986 100644
--- a/create/postgresql/schema.sql
+++ b/create/postgresql/schema.sql
@@ -586,7 +586,8 @@ CREATE TABLE profiles (
profileid serial,
userid int4 DEFAULT '0' NOT NULL,
idx varchar(64) DEFAULT '' NOT NULL,
- value varchar(64) DEFAULT '' NOT NULL,
+ value varchar(255) DEFAULT '' NOT NULL,
+ valuetype int4 DEFAULT 0 NOT NULL,
PRIMARY KEY (profileid)
);
@@ -784,4 +785,30 @@ CREATE TABLE acknowledges (
CREATE INDEX acknowledges_alarmid on acknowledgeid (alarmid);
+--
+-- Table structure for table 'applications'
+--
+
+CREATE TABLE applications (
+ applicationid serial,
+ hostid int4 DEFAULT '0' NOT NULL,
+ name varchar(255) DEFAULT '' NOT NULL,
+ templateid int4 DEFAULT '0' NOT NULL,
+ PRIMARY KEY (applicationid),
+ FOREIGN KEY hostid (hostid) REFERENCES hosts
+);
+CREATE UNIQUE INDEX applications_hostid_key on items (hostid,name);
+
+--
+-- Table structure for table 'items_applications'
+--
+
+CREATE TABLE items_applications (
+ applicationid int4 DEFAULT '0' NOT NULL,
+ itemid int4 DEFAULT '0' NOT NULL,
+ PRIMARY KEY (applicationid,itemid),
+ FOREIGN KEY (applicationid) REFERENCES applications,
+ FOREIGN KEY (itemid) REFERENCES items
+);
+
VACUUM ANALYZE;