diff options
| author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2001-06-29 19:39:27 +0000 |
|---|---|---|
| committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2001-06-29 19:39:27 +0000 |
| commit | dd9b362b7a6f5e0a0c1c9aa43ed82fb1aa2e4047 (patch) | |
| tree | cc286afa9b0622fae55f68e9950f2540891572cc /create/postgresql/schema.sql | |
| parent | 075e865d6de67fa7ca523196029ac205b00f619b (diff) | |
| download | zabbix-dd9b362b7a6f5e0a0c1c9aa43ed82fb1aa2e4047.tar.gz zabbix-dd9b362b7a6f5e0a0c1c9aa43ed82fb1aa2e4047.tar.xz zabbix-dd9b362b7a6f5e0a0c1c9aa43ed82fb1aa2e4047.zip | |
Minor changes.
git-svn-id: svn://svn.zabbix.com/trunk@114 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'create/postgresql/schema.sql')
| -rw-r--r-- | create/postgresql/schema.sql | 71 |
1 files changed, 57 insertions, 14 deletions
diff --git a/create/postgresql/schema.sql b/create/postgresql/schema.sql index 754b73b3..26a2d46b 100644 --- a/create/postgresql/schema.sql +++ b/create/postgresql/schema.sql @@ -1,20 +1,6 @@ \connect zabbix -- --- Table structure for table 'sysmaps' --- - -CREATE TABLE sysmaps ( - sysmapid serial, - name varchar(128) DEFAULT '' NOT NULL, - width int4 DEFAULT '0' NOT NULL, - height int4 DEFAULT '0' NOT NULL, - PRIMARY KEY (sysmapid) -); - -CREATE UNIQUE INDEX sysmaps_name on sysmaps (name); - --- -- Table structure for table 'hosts' -- @@ -237,4 +223,61 @@ CREATE TABLE media ( FOREIGN KEY (userid) REFERENCES users ); +-- +-- Table structure for table 'sysmaps' +-- + +CREATE TABLE sysmaps ( + sysmapid serial, + name varchar(128) DEFAULT '' NOT NULL, + width int4 DEFAULT '0' NOT NULL, + height int4 DEFAULT '0' NOT NULL, + PRIMARY KEY (sysmapid) +); + +CREATE UNIQUE INDEX sysmaps_name on sysmaps (name); + +-- +-- Table structure for table 'sysmaps_hosts' +-- + +CREATE TABLE sysmaps_links ( + linkid serial, + sysmapid int4 DEFAULT '0' NOT NULL, + shostid1 int4 DEFAULT '0' NOT NULL, + shostid2 int4 DEFAULT '0' NOT NULL, + PRIMARY KEY (linkid), + FOREIGN KEY (sysmapid) REFERENCES sysmaps, + FOREIGN KEY (shostid1) REFERENCES items, + FOREIGN KEY (shostid2) REFERENCES items +); + +-- +-- Table structure for table 'graphs' +-- + +CREATE TABLE graphs ( + graphid serial, + name varchar(128) DEFAULT '' NOT NULL, + width int4 DEFAULT '0' NOT NULL, + height int4 DEFAULT '0' NOT NULL, + PRIMARY KEY (graphid), + UNIQUE (name) +); + +CREATE UNIQUE INDEX graphs_name on graphs (name); + +-- +-- Table structure for table 'graphs_items' +-- + +CREATE TABLE graphs_items ( + gitemid serial, + graphid int4 DEFAULT '0' NOT NULL, + itemid int4 DEFAULT '0' NOT NULL, + PRIMARY KEY (gitemid), + FOREIGN KEY (graphid) REFERENCES graphs, + FOREIGN KEY (itemid) REFERENCES items +); + VACUUM ANALYZE; |
