summaryrefslogtreecommitdiffstats
path: root/create
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2001-03-31 10:06:10 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2001-03-31 10:06:10 +0000
commitc07070ac96e446bbdeae5bec1dbcb0af6f48896e (patch)
tree98d7d8395173057b0b86a5973c0213a7f766b3de /create
parent18eabc5239fa565a90b963c533330b34e16b2805 (diff)
downloadzabbix-c07070ac96e446bbdeae5bec1dbcb0af6f48896e.tar.gz
zabbix-c07070ac96e446bbdeae5bec1dbcb0af6f48896e.tar.xz
zabbix-c07070ac96e446bbdeae5bec1dbcb0af6f48896e.zip
Quite a lot of changes:
- added table groups - changed structure of table users - added authorisation mechanism - menu highlighting in PHP frontend git-svn-id: svn://svn.zabbix.com/trunk@19 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'create')
-rw-r--r--create/mysql/schema.sql67
1 files changed, 42 insertions, 25 deletions
diff --git a/create/mysql/schema.sql b/create/mysql/schema.sql
index 6caa2145..626846a4 100644
--- a/create/mysql/schema.sql
+++ b/create/mysql/schema.sql
@@ -3,24 +3,39 @@
#
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 int(1) DEFAULT '0' NOT NULL
);
insert into config (smtp_server,smtp_helo,smtp_email) values ("localhost","localhost","zabbix@localhost");
#
+# Table structure for table 'groups'
+#
+
+CREATE TABLE groups (
+ groupid int(4) NOT NULL auto_increment,
+ name varchar(64) DEFAULT '' NOT NULL,
+ PRIMARY KEY (groupid),
+ UNIQUE (name)
+);
+
+insert into groups (groupid,name) values (1,"Administrators");
+insert into groups (groupid,name) values (2,"Zabbix user");
+
+#
# Table structure for table 'alerts'
#
CREATE TABLE alerts (
- alertid int(4) NOT NULL auto_increment,
- clock int(4) DEFAULT '0' NOT NULL,
- type varchar(10) DEFAULT '' NOT NULL,
- sendto varchar(100) DEFAULT '' NOT NULL,
- subject varchar(255) DEFAULT '' NOT NULL,
- message varchar(255) DEFAULT '' NOT NULL,
+ alertid int(4) NOT NULL auto_increment,
+ clock int(4) DEFAULT '0' NOT NULL,
+ type varchar(10) DEFAULT '' NOT NULL,
+ sendto varchar(100) DEFAULT '' NOT NULL,
+ subject varchar(255) DEFAULT '' NOT NULL,
+ message varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (alertid),
KEY clock (clock)
);
@@ -30,14 +45,14 @@ CREATE TABLE alerts (
#
CREATE TABLE actions (
- actionid int(4) NOT NULL auto_increment,
- triggerid int(4) DEFAULT '0' NOT NULL,
- userid int(4) DEFAULT '0' NOT NULL,
- good int(4) DEFAULT '0' NOT NULL,
- delay int(4) DEFAULT '0' NOT NULL,
- subject varchar(255) DEFAULT '' NOT NULL,
- message varchar(255) DEFAULT '' NOT NULL,
- nextcheck int(4) DEFAULT '0' NOT NULL,
+ actionid int(4) NOT NULL auto_increment,
+ triggerid int(4) DEFAULT '0' NOT NULL,
+ userid int(4) DEFAULT '0' NOT NULL,
+ good int(4) DEFAULT '0' NOT NULL,
+ delay int(4) DEFAULT '0' NOT NULL,
+ subject varchar(255) DEFAULT '' NOT NULL,
+ message varchar(255) DEFAULT '' NOT NULL,
+ nextcheck int(4) DEFAULT '0' NOT NULL,
PRIMARY KEY (actionid)
);
@@ -46,10 +61,10 @@ CREATE TABLE actions (
#
CREATE TABLE alarms (
- alarmid int(4) NOT NULL auto_increment,
- triggerid int(4) DEFAULT '0' NOT NULL,
- clock int(4) DEFAULT '0' NOT NULL,
- istrue int(4) DEFAULT '0' NOT NULL,
+ alarmid int(4) NOT NULL auto_increment,
+ triggerid int(4) DEFAULT '0' NOT NULL,
+ clock int(4) DEFAULT '0' NOT NULL,
+ istrue int(4) DEFAULT '0' NOT NULL,
PRIMARY KEY (alarmid)
);
@@ -288,10 +303,12 @@ CREATE TABLE triggers (
#
CREATE TABLE users (
- userid int(4) NOT NULL auto_increment,
- alias varchar(100) DEFAULT '' NOT NULL,
- name varchar(100) DEFAULT '' NOT NULL,
- surname varchar(100) DEFAULT '' NOT NULL,
+ userid int(4) NOT NULL auto_increment,
+ groupid int(4) NOT NULL DEFAULT '0',
+ alias varchar(100) DEFAULT '' NOT NULL,
+ name varchar(100) DEFAULT '' NOT NULL,
+ surname varchar(100) DEFAULT '' NOT NULL,
+ passwd varchar(64) DEFAULT '' NOT NULL,
PRIMARY KEY (userid),
UNIQUE (alias)
);