summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2003-01-12 14:09:54 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2003-01-12 14:09:54 +0000
commit9bb0fbb8a50bcf395bafcf2d2edfba6a96cf0794 (patch)
tree0c97c99724541d32d07b05f7a84f9419efb44f02
parentb77799f5dcc47bbf2bf9a419c31e328045d6f21a (diff)
downloadzabbix-9bb0fbb8a50bcf395bafcf2d2edfba6a96cf0794.tar.gz
zabbix-9bb0fbb8a50bcf395bafcf2d2edfba6a96cf0794.tar.xz
zabbix-9bb0fbb8a50bcf395bafcf2d2edfba6a96cf0794.zip
Updated PostgreSQL schema and added patches.
git-svn-id: svn://svn.zabbix.com/trunk@640 97f52cf1-0a1b-0410-bd0e-c28be96e8082
-rw-r--r--create/postgresql/schema.sql15
-rw-r--r--upgrades/dbpatches/1.0beta7_to_1.0beta8/mysql/patch.sql14
-rw-r--r--upgrades/dbpatches/1.0beta7_to_1.0beta8/postgresql/patch.sql15
3 files changed, 44 insertions, 0 deletions
diff --git a/create/postgresql/schema.sql b/create/postgresql/schema.sql
index 11cc9c71..672b8725 100644
--- a/create/postgresql/schema.sql
+++ b/create/postgresql/schema.sql
@@ -433,4 +433,19 @@ CREATE TABLE service_alarms (
CREATE INDEX services_alarms_serviceid_clock on service_alarms (serviceid,clock);
CREATE INDEX services_alarms_clock on service_alarms (clock);
+--
+-- Table structure for table 'profiles'
+--
+
+CREATE TABLE profiles (
+ profileid serial,
+ userid int4 DEFAULT '0' NOT NULL,
+ idx varchar(64) DEFAULT '' NOT NULL,
+ value varchar(64) DEFAULT '' NOT NULL,
+ PRIMARY KEY (profileid)
+);
+
+CREATE INDEX profiles_userid on profiles (userid);
+CREATE UNIQUE INDEX profiles_userid_idx on profiles (userid,idx);
+
VACUUM ANALYZE;
diff --git a/upgrades/dbpatches/1.0beta7_to_1.0beta8/mysql/patch.sql b/upgrades/dbpatches/1.0beta7_to_1.0beta8/mysql/patch.sql
index 12f6d601..a0a2d742 100644
--- a/upgrades/dbpatches/1.0beta7_to_1.0beta8/mysql/patch.sql
+++ b/upgrades/dbpatches/1.0beta7_to_1.0beta8/mysql/patch.sql
@@ -1 +1,15 @@
create unique index hosts_host on hosts (host);
+
+--
+-- Table structure for table 'profiles'
+--
+
+CREATE TABLE profiles (
+ profileid int(4) NOT NULL auto_increment,
+ userid int(4) DEFAULT '0' NOT NULL,
+ idx varchar(64) DEFAULT '' NOT NULL,
+ value varchar(64) DEFAULT '' NOT NULL,
+ PRIMARY KEY (profileid),
+ KEY (userid),
+ UNIQUE (userid,idx)
+) type=InnoDB;
diff --git a/upgrades/dbpatches/1.0beta7_to_1.0beta8/postgresql/patch.sql b/upgrades/dbpatches/1.0beta7_to_1.0beta8/postgresql/patch.sql
index 656986ae..8dc69fcc 100644
--- a/upgrades/dbpatches/1.0beta7_to_1.0beta8/postgresql/patch.sql
+++ b/upgrades/dbpatches/1.0beta7_to_1.0beta8/postgresql/patch.sql
@@ -1 +1,16 @@
CREATE UNIQUE INDEX hosts_host on hosts (host);
+
+--
+-- Table structure for table 'profiles'
+--
+
+CREATE TABLE profiles (
+ profileid serial,
+ userid int4 DEFAULT '0' NOT NULL,
+ idx varchar(64) DEFAULT '' NOT NULL,
+ value varchar(64) DEFAULT '' NOT NULL,
+ PRIMARY KEY (profileid)
+);
+
+CREATE INDEX profiles_userid on profiles (userid);
+CREATE UNIQUE INDEX profiles_userid_idx on profiles (userid,idx);