diff options
| author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2003-05-25 16:15:30 +0000 |
|---|---|---|
| committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2003-05-25 16:15:30 +0000 |
| commit | 7a92bd8598c91aa3be9d716fad35a6574b9e06ce (patch) | |
| tree | 2702d2b95f961999be587eaa4955c5e7abc649b4 /create/postgresql/schema.sql | |
| parent | c0f005eadc69aaf9fabc16941083fb6335108810 (diff) | |
| download | zabbix-7a92bd8598c91aa3be9d716fad35a6574b9e06ce.tar.gz zabbix-7a92bd8598c91aa3be9d716fad35a6574b9e06ce.tar.xz zabbix-7a92bd8598c91aa3be9d716fad35a6574b9e06ce.zip | |
- added src/zabbix_sucker/alerter.h (Alexei)
- added src/zabbix_sucker/alerter.c (Alexei)
- removed column alerts.type, added column alerts.mediatypeid (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@779 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'create/postgresql/schema.sql')
| -rw-r--r-- | create/postgresql/schema.sql | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/create/postgresql/schema.sql b/create/postgresql/schema.sql index 5ad70042..fa95780d 100644 --- a/create/postgresql/schema.sql +++ b/create/postgresql/schema.sql @@ -75,9 +75,9 @@ CREATE INDEX items_status on items (status); -- CREATE TABLE config ( - smtp_server varchar(255) DEFAULT '' NOT NULL, - smtp_helo varchar(255) DEFAULT '' NOT NULL, - smtp_email varchar(255) DEFAULT '' NOT NULL, +-- smtp_server varchar(255) DEFAULT '' NOT NULL, +-- smtp_helo varchar(255) DEFAULT '' NOT NULL, +-- smtp_email varchar(255) DEFAULT '' NOT NULL, -- password_required int4 DEFAULT '0' NOT NULL, alert_history int4 DEFAULT '0' NOT NULL, alarm_history int4 DEFAULT '0' NOT NULL @@ -177,6 +177,22 @@ CREATE TABLE actions ( ); -- +-- Table structure for table 'media_type' +-- + +CREATE TABLE media_type ( + mediatypeid serial, + type int4 DEFAULT '0' NOT NULL, + description varchar(100) DEFAULT '' NOT NULL, + smtp_server varchar(255) DEFAULT '' NOT NULL, + smtp_helo varchar(255) DEFAULT '' NOT NULL, + smtp_email varchar(255) DEFAULT '' NOT NULL, + exec_path varchar(255) DEFAULT '' NOT NULL, + PRIMARY KEY(mediatypeid) +); + + +-- -- Table structure for table 'alerts' -- @@ -186,12 +202,14 @@ CREATE TABLE alerts ( clock int4 DEFAULT '0' NOT NULL, status int4 DEFAULT '0' NOT NULL, retries int4 DEFAULT '0' NOT NULL, - type varchar(10) DEFAULT '' NOT NULL, +-- type varchar(10) DEFAULT '' NOT NULL, + mediatypeid int4 DEFAULT '0' NOT NULL, sendto varchar(100) DEFAULT '' NOT NULL, subject varchar(255) DEFAULT '' NOT NULL, message text DEFAULT '' NOT NULL, PRIMARY KEY (alertid), - FOREIGN KEY (actionid) REFERENCES actions + FOREIGN KEY (actionid) REFERENCES actions, + FOREIGN KEY (mediatypeid) REFERENCES media_type ); CREATE INDEX alerts_actionid on alerts (actionid); @@ -293,11 +311,13 @@ CREATE TABLE triggers_template ( CREATE TABLE media ( mediaid serial, userid int4 DEFAULT '0' NOT NULL, - type varchar(10) DEFAULT '' NOT NULL, +-- type varchar(10) DEFAULT '' NOT NULL, + mediatypeid int4 DEFAULT '0' NOT NULL, sendto varchar(100) DEFAULT '' NOT NULL, active int4 DEFAULT '0' NOT NULL, PRIMARY KEY (mediaid), - FOREIGN KEY (userid) REFERENCES users + FOREIGN KEY (userid) REFERENCES users, + FOREIGN KEY (mediatypeid) REFERENCES media_type, ); -- |
