summaryrefslogtreecommitdiffstats
path: root/upgrades
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2003-08-31 07:58:36 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2003-08-31 07:58:36 +0000
commit6afa1d21ab7b9277254abec2c18d4d31f00ccdd5 (patch)
tree7b2ff2aefda41616c0d1ca0e9c2687b5273e0005 /upgrades
parent53fc7cb9156ba814739969439ebb5c1dbdd958a7 (diff)
downloadzabbix-6afa1d21ab7b9277254abec2c18d4d31f00ccdd5.tar.gz
zabbix-6afa1d21ab7b9277254abec2c18d4d31f00ccdd5.tar.xz
zabbix-6afa1d21ab7b9277254abec2c18d4d31f00ccdd5.zip
- added table users_groups, usrgrp (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@958 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'upgrades')
-rw-r--r--upgrades/dbpatches/1.0beta10_to_1.0beta11/mysql/patch.sql20
-rw-r--r--upgrades/dbpatches/1.0beta10_to_1.0beta11/postgresql/patch.sql23
2 files changed, 43 insertions, 0 deletions
diff --git a/upgrades/dbpatches/1.0beta10_to_1.0beta11/mysql/patch.sql b/upgrades/dbpatches/1.0beta10_to_1.0beta11/mysql/patch.sql
new file mode 100644
index 00000000..7d65aefe
--- /dev/null
+++ b/upgrades/dbpatches/1.0beta10_to_1.0beta11/mysql/patch.sql
@@ -0,0 +1,20 @@
+--
+-- Table structure for table 'usrgrp'
+--
+
+CREATE TABLE usrgrp (
+ usrgrpid int(4) NOT NULL auto_increment,
+ name varchar(64) DEFAULT '' NOT NULL,
+ PRIMARY KEY (usrgrpid),
+ UNIQUE (name)
+) type=InnoDB;
+
+--
+-- Table structure for table 'users_groups'
+--
+
+CREATE TABLE users_groups (
+ usrgrpid int(4) DEFAULT '0' NOT NULL,
+ userid int(4) DEFAULT '0' NOT NULL,
+ PRIMARY KEY (usrgrpid,userid)
+) type=InnoDB;
diff --git a/upgrades/dbpatches/1.0beta10_to_1.0beta11/postgresql/patch.sql b/upgrades/dbpatches/1.0beta10_to_1.0beta11/postgresql/patch.sql
new file mode 100644
index 00000000..07b129b7
--- /dev/null
+++ b/upgrades/dbpatches/1.0beta10_to_1.0beta11/postgresql/patch.sql
@@ -0,0 +1,23 @@
+--
+-- 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
+);