From cff3cc1ef8b6ac526e7968be6a10c09669461be1 Mon Sep 17 00:00:00 2001 From: osmiy Date: Wed, 3 May 2006 06:35:28 +0000 Subject: - 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 --- create/postgresql/schema.sql | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'create/postgresql/schema.sql') 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; -- cgit