diff options
| author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2001-04-16 17:46:03 +0000 |
|---|---|---|
| committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2001-04-16 17:46:03 +0000 |
| commit | aeff090d93142dab0770805527bf943091d85274 (patch) | |
| tree | be1528337e0ecfc0bdb7a6050e8c585e9d4a9db5 /create/postgresql/schema.sql | |
| parent | a2f46eff39e547e40d042ce97851805b9f9efea4 (diff) | |
| download | zabbix-aeff090d93142dab0770805527bf943091d85274.tar.gz zabbix-aeff090d93142dab0770805527bf943091d85274.tar.xz zabbix-aeff090d93142dab0770805527bf943091d85274.zip | |
Added PostgreSQL support for PHP frontend.
git-svn-id: svn://svn.zabbix.com/trunk@43 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'create/postgresql/schema.sql')
| -rw-r--r-- | create/postgresql/schema.sql | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/create/postgresql/schema.sql b/create/postgresql/schema.sql index c75c137a..9b6fd060 100644 --- a/create/postgresql/schema.sql +++ b/create/postgresql/schema.sql @@ -64,7 +64,7 @@ CREATE TABLE config ( smtp_server varchar(255) DEFAULT '' NOT NULL, smtp_helo varchar(255) DEFAULT '' NOT NULL, smtp_email varchar(255) DEFAULT '' NOT NULL, - password_required bool DEFAULT '0' NOT NULL + password_required int4 DEFAULT '0' NOT NULL ); insert into config (smtp_server,smtp_helo,smtp_email) values ('localhost','localhost','zabbix@localhost'); @@ -148,6 +148,7 @@ CREATE TABLE alerts ( sendto varchar(100) DEFAULT '' NOT NULL, subject varchar(255) DEFAULT '' NOT NULL, message varchar(255) DEFAULT '' NOT NULL, + PRIMARY KEY (alertid), FOREIGN KEY (actionid) REFERENCES actions ); @@ -163,7 +164,8 @@ CREATE TABLE alarms ( triggerid int4 DEFAULT '0' NOT NULL, clock int4 DEFAULT '0' NOT NULL, istrue int4 DEFAULT '0' NOT NULL, - PRIMARY KEY (alarmid) + PRIMARY KEY (alarmid), + FOREIGN KEY (triggerid) REFERENCES triggers ); -- @@ -194,7 +196,8 @@ CREATE TABLE history ( itemid int4 DEFAULT '0' NOT NULL, clock int4 DEFAULT '0' NOT NULL, value float8 DEFAULT '0.0000' NOT NULL, - PRIMARY KEY (itemid,clock) + PRIMARY KEY (itemid,clock), + FOREIGN KEY (itemid) REFERENCES items ); @@ -208,7 +211,8 @@ CREATE TABLE items_template ( description varchar(255) DEFAULT '' NOT NULL, key_ varchar(64) DEFAULT '' NOT NULL, delay int4 DEFAULT '0' NOT NULL, - PRIMARY KEY (itemtemplateid) + PRIMARY KEY (itemtemplateid), + FOREIGN KEY (platformid) REFERENCES platforms ); CREATE UNIQUE INDEX items_template_p_k on items_template (platformid, key_); |
