From 6afa1d21ab7b9277254abec2c18d4d31f00ccdd5 Mon Sep 17 00:00:00 2001
From: hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>
Date: Sun, 31 Aug 2003 07:58:36 +0000
Subject:  - added table users_groups, usrgrp (Alexei)

git-svn-id: svn://svn.zabbix.com/trunk@958 97f52cf1-0a1b-0410-bd0e-c28be96e8082
---
 create/postgresql/schema.sql | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

(limited to 'create/postgresql/schema.sql')

diff --git a/create/postgresql/schema.sql b/create/postgresql/schema.sql
index 96273b11..f6d09aef 100644
--- a/create/postgresql/schema.sql
+++ b/create/postgresql/schema.sql
@@ -526,4 +526,28 @@ CREATE TABLE stats (
   PRIMARY KEY (itemid,year,month,day,hour)
 );
 
+--
+-- Table structure for table 'usrgrp'
+--
+
+CREATE TABLE usrgrp (
+  usrgrpid		serial,
+  name			varchar(64)	DEFAULT '' NOT NULL,
+  PRIMARY KEY (usrgrpid)
+);
+
+CREATE UNIQUE INDEX usrgrp_name on usrgrp (name);
+
+--
+-- Table structure for table 'users_groups'
+--
+
+CREATE TABLE users_groups (
+  usrgrpid		int4		DEFAULT '0' NOT NULL,
+  userid		int4		DEFAULT '0' NOT NULL,
+  PRIMARY KEY (usrgrpid,userid),
+  FOREIGN KEY (usrgrpid) REFERENCES usrgrp,
+  FOREIGN KEY (userid) REFERENCES users
+);
+
 VACUUM ANALYZE;
-- 
cgit 

