aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoricewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-03-04 16:13:56 +0000
committericewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-03-04 16:13:56 +0000
commiteeacb1d9e00228b202f732f6c9d3d078a17fc6f9 (patch)
tree3acb6856254d8af17acfd341e1e64a6ae5c92ae2
parent0ab50db994f7d49bd33ca51e6a7316aff71ec713 (diff)
downloadelgg-eeacb1d9e00228b202f732f6c9d3d078a17fc6f9.tar.gz
elgg-eeacb1d9e00228b202f732f6c9d3d078a17fc6f9.tar.bz2
Added metadata and annotations, removed superfluous tables.
git-svn-id: https://code.elgg.org/elgg/trunk@70 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/schema/mysql.sql104
1 files changed, 43 insertions, 61 deletions
diff --git a/engine/schema/mysql.sql b/engine/schema/mysql.sql
index f1b52e62d..d6f0a6ebb 100644
--- a/engine/schema/mysql.sql
+++ b/engine/schema/mysql.sql
@@ -64,33 +64,6 @@ CREATE TABLE `prefix_configuration` (
-- --------------------------------------------------------
--
--- Table structure for table `metadata_type`
---
-
-CREATE TABLE `prefix_metadata_type` (
- `id` int(11) NOT NULL auto_increment,
- `name` varchar(32) NOT NULL,
- PRIMARY KEY (`id`),
- KEY `name` (`name`)
-) ENGINE=MyISAM ;
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `metadata_value`
---
-
-CREATE TABLE `prefix_metadata_value` (
- `id` int(11) NOT NULL auto_increment,
- `value` text NOT NULL,
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM ;
-
-
--- --------------------------------------------------------
-
---
-- Table structure for table `objects`
--
@@ -111,24 +84,6 @@ CREATE TABLE `prefix_objects` (
-- --------------------------------------------------------
--
--- Table structure for table `object_metadata`
---
-
-CREATE TABLE `prefix_object_metadata` (
- `id` int(11) NOT NULL auto_increment,
- `object_id` int(11) NOT NULL,
- `metadata_type_id` int(11) NOT NULL,
- `value_id` int(11) NOT NULL,
- `access_id` int(11) NOT NULL,
- `site_id` int(11) NOT NULL default '0',
- PRIMARY KEY (`id`),
- KEY `object_id` (`object_id`,`metadata_type_id`,`value_id`),
- KEY `access_id` (`access_id`)
-) ENGINE=MyISAM ;
-
--- --------------------------------------------------------
-
---
-- Table structure for table `object_types`
--
@@ -164,22 +119,6 @@ CREATE TABLE `prefix_users` (
FULLTEXT KEY `name` (`name`)
) ENGINE=MyISAM ;
--- --------------------------------------------------------
-
---
--- Table structure for table `user_metadata`
---
-
-CREATE TABLE `prefix_user_metadata` (
- `id` int(11) NOT NULL auto_increment,
- `user_id` int(11) NOT NULL,
- `metadata_type_id` int(11) NOT NULL,
- `value_id` int(11) NOT NULL,
- `access_id` int(11) NOT NULL,
- PRIMARY KEY (`id`),
- KEY `user_id` (`user_id`,`metadata_type_id`,`value_id`),
- KEY `access_id` (`access_id`)
-) ENGINE=MyISAM ;
-- --------------------------------------------------------
@@ -203,3 +142,46 @@ CREATE TABLE `prefix_sites` (
PRIMARY KEY (`id`)
) ENGINE=MyISAM ;
+
+--
+-- Table structure for annotations
+--
+CREATE TABLE `prefix_annotations` (
+ `id` int(11) NOT NULL auto_increment,
+
+ `object_id` int(11) NOT NULL,
+ `object_type` enum ('object', 'user', 'collection', 'site') NOT NULL,
+
+ `name` varchar(255) NOT NULL,
+ `value` text NOT NULL,
+ `value_type` enum ('integer','tag','text','file') NOT NULL,
+
+ `owner_id` int(11) NOT NULL,
+ `created` int(11) NOT NULL,
+
+ `access_id` int(11) NOT NULL,
+
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM;
+
+--
+-- Table structure for metadata
+--
+CREATE TABLE `prefix_metadata` (
+ `id` int(11) NOT NULL auto_increment,
+
+ `object_id` int(11) NOT NULL,
+ `object_type` enum ('object', 'user', 'collection', 'site') NOT NULL,
+
+ `name` varchar(255) NOT NULL,
+ `value` text NOT NULL,
+ `value_type` enum ('integer','tag','text','file') NOT NULL,
+
+ `created` int(11) NOT NULL,
+
+ `access_id` int(11) NOT NULL,
+
+ PRIMARY KEY (`id`),
+ UNIQUE KEY (`object_id`,`object_type`, `name`)
+
+) ENGINE=MyISAM;