[dev] Categories SQL patch
John Morrissey
jwm at horde.net
Sun May 25 07:59:01 PDT 2003
The attached patch fixes a typo in categories.sql (I think I understand what
Chuck was trying to do with that index) and adds the new
horde_category_attributes table to the MySQL-specific scripts. I'll leave
the Sybase and Oracle scripts to those who have the experience.
john
--
John Morrissey _o /\ ---- __o
jwm at horde.net _-< \_ / \ ---- < \,
www.horde.net/ __(_)/_(_)________/ \_______(_) /_(_)__
-------------- next part --------------
Index: category.sql
===================================================================
RCS file: /repository/horde/scripts/db/category.sql,v
retrieving revision 1.15
diff -u -u -r1.15 category.sql
--- category.sql 25 May 2003 13:42:34 -0000 1.15
+++ category.sql 25 May 2003 14:56:51 -0000
@@ -34,7 +34,7 @@
CREATE INDEX category_attribute_idx ON horde_category_attributes (category_id);
CREATE INDEX category_attribute_name_idx ON horde_category_attributes (attribute_name);
-CREATE INDEX category_attribute_key_idx ON horde_category_key (attribute_type);
+CREATE INDEX category_attribute_key_idx ON horde_category_attributes (attribute_key);
GRANT SELECT, INSERT, UPDATE, DELETE ON horde_categories TO horde;
Index: category_mysql.sql
===================================================================
RCS file: /repository/horde/scripts/db/category_mysql.sql,v
retrieving revision 1.8
diff -u -u -r1.8 category_mysql.sql
--- category_mysql.sql 9 Dec 2002 00:07:24 -0000 1.8
+++ category_mysql.sql 25 May 2003 14:56:51 -0000
@@ -18,4 +18,16 @@
CREATE INDEX category_user_idx ON horde_categories (user_uid);
CREATE INDEX category_serialized_idx ON horde_categories (category_serialized);
+CREATE TABLE horde_category_attributes (
+ category_id INT NOT NULL,
+ attribute_name VARCHAR(255) NOT NULL,
+ attribute_key VARCHAR(255),
+ attribute_value TEXT
+);
+
+CREATE INDEX category_attribute_idx ON horde_category_attributes (category_id);
+CREATE INDEX category_attribute_name_idx ON horde_category_attributes (attribute_name);
+CREATE INDEX category_attribute_key_idx ON horde_category_attributes (attribute_key);
+
GRANT SELECT, INSERT, UPDATE, DELETE ON horde_categories TO horde;
+GRANT SELECT, INSERT, UPDATE, DELETE ON horde_category_attributes TO horde;
Index: mysql_create.sql
===================================================================
RCS file: /repository/horde/scripts/db/mysql_create.sql,v
retrieving revision 1.13
diff -u -u -r1.13 mysql_create.sql
--- mysql_create.sql 7 Mar 2003 18:10:45 -0000 1.13
+++ mysql_create.sql 25 May 2003 14:56:51 -0000
@@ -86,7 +86,19 @@
CREATE INDEX category_user_idx ON horde_categories (user_uid);
CREATE INDEX category_serialized_idx ON horde_categories (category_serialized);
+CREATE TABLE horde_category_attributes (
+ category_id INT NOT NULL,
+ attribute_name VARCHAR(255) NOT NULL,
+ attribute_key VARCHAR(255),
+ attribute_value TEXT
+);
+
+CREATE INDEX category_attribute_idx ON horde_category_attributes (category_id);
+CREATE INDEX category_attribute_name_idx ON horde_category_attributes (attribute_name);
+CREATE INDEX category_attribute_key_idx ON horde_category_attributes (attribute_key);
+
GRANT SELECT, INSERT, UPDATE, DELETE ON horde_categories TO horde at localhost;
+GRANT SELECT, INSERT, UPDATE, DELETE ON horde_category_attributes TO horde;
FLUSH PRIVILEGES;
More information about the dev
mailing list