diff options
Diffstat (limited to 'create/postgresql/schema.sql')
| -rw-r--r-- | create/postgresql/schema.sql | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/create/postgresql/schema.sql b/create/postgresql/schema.sql index 26a2d46b..c002a55b 100644 --- a/create/postgresql/schema.sql +++ b/create/postgresql/schema.sql @@ -248,8 +248,24 @@ CREATE TABLE sysmaps_links ( shostid2 int4 DEFAULT '0' NOT NULL, PRIMARY KEY (linkid), FOREIGN KEY (sysmapid) REFERENCES sysmaps, - FOREIGN KEY (shostid1) REFERENCES items, - FOREIGN KEY (shostid2) REFERENCES items + FOREIGN KEY (shostid1) REFERENCES sysmaps_hosts, + FOREIGN KEY (shostid2) REFERENCES sysmaps_hosts +); + +-- +-- Table structure for table 'sysmaps_hosts' +-- + +CREATE TABLE sysmaps_hosts ( + shostid serial, + sysmapid int4 DEFAULT '0' NOT NULL, + hostid int4 DEFAULT '0' NOT NULL, + label varchar(128) DEFAULT '' NOT NULL, + x int4 DEFAULT '0' NOT NULL, + y int4 DEFAULT '0' NOT NULL, + PRIMARY KEY (shostid), + FOREIGN KEY (sysmapid) REFERENCES sysmaps, + FOREIGN KEY (hostid) REFERENCES hosts ); -- |
