aboutsummaryrefslogtreecommitdiff
path: root/engine/schema
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-02-14 16:32:36 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-02-14 16:32:36 +0000
commit269c58d56242a9c4bf4cac067efdbc6774424a32 (patch)
tree971369045067f5a7180b70939368eafee21e9a31 /engine/schema
parent5b373ca622653dcdea04f7f2ce73b6ee22495f43 (diff)
downloadelgg-269c58d56242a9c4bf4cac067efdbc6774424a32.tar.gz
elgg-269c58d56242a9c4bf4cac067efdbc6774424a32.tar.bz2
Actions, .htaccess, and the database schema
git-svn-id: https://code.elgg.org/elgg/trunk@31 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/schema')
-rw-r--r--engine/schema/mysql.sql177
1 files changed, 177 insertions, 0 deletions
diff --git a/engine/schema/mysql.sql b/engine/schema/mysql.sql
new file mode 100644
index 000000000..9b8304b80
--- /dev/null
+++ b/engine/schema/mysql.sql
@@ -0,0 +1,177 @@
+--
+-- Main Elgg database
+--
+-- @link http://elgg.org/
+-- @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+-- @author Curverider Ltd
+-- @copyright Curverider Ltd 2008
+-- @link http://elgg.org/
+--
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `access_groups`
+--
+
+CREATE TABLE `access_groups` (
+ `id` int(11) NOT NULL,
+ `name` varchar(16) NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `name` (`name`)
+) ENGINE=MyISAM ;
+
+--
+-- Dumping data for table `access_groups`
+--
+
+INSERT INTO `access_groups` (`id`, `name`) VALUES
+(0, 'PRIVATE'),
+(1, 'LOGGED_IN'),
+(2, 'PUBLIC');
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `access_group_membership`
+--
+
+CREATE TABLE `access_group_membership` (
+ `user_id` int(11) NOT NULL,
+ `access_group_id` int(11) NOT NULL,
+ PRIMARY KEY (`user_id`,`access_group_id`)
+) ENGINE=MyISAM ;
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `configuration`
+--
+
+CREATE TABLE `configuration` (
+ `id` int(11) NOT NULL,
+ `name` varchar(32) NOT NULL,
+ `value` text NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `name` (`name`)
+) ENGINE=MyISAM ;
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `metadata_type`
+--
+
+CREATE TABLE `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 `metadata_value` (
+ `id` int(11) NOT NULL auto_increment,
+ `value` text NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM ;
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `objects`
+--
+
+CREATE TABLE `objects` (
+ `id` int(11) NOT NULL auto_increment,
+ `owner_id` int(11) NOT NULL,
+ `site_id` int(11) NOT NULL,
+ `type_id` int(11) NOT NULL,
+ `title` text NOT NULL,
+ `description` text NOT NULL,
+ `time_created` int(11) NOT NULL,
+ `time_updated` int(11) NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `time_created` (`time_created`,`time_updated`)
+) ENGINE=MyISAM ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `object_metadata`
+--
+
+CREATE TABLE `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,
+ 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`
+--
+
+CREATE TABLE `object_types` (
+ `id` int(11) NOT NULL auto_increment,
+ `name` varchar(16) NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `name` (`name`)
+) ENGINE=MyISAM ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `users`
+--
+
+CREATE TABLE `users` (
+ `id` int(11) NOT NULL auto_increment,
+ `name` text NOT NULL,
+ `username` varchar(12) NOT NULL default '',
+ `password` varchar(32) NOT NULL default '',
+ `email` text NOT NULL,
+ `code` varchar(32) NOT NULL default '',
+ `last_updated` int(11) NOT NULL default '0',
+ `registered` int(11) NOT NULL default '0',
+ `enabled` enum('yes','no') NOT NULL default 'no',
+ `last_action` int(11) NOT NULL default '0',
+ `prev_last_action` int(11) NOT NULL default '0',
+ `last_login` int(11) NOT NULL default '0',
+ `prev_last_login` int(11) NOT NULL default '0',
+ PRIMARY KEY (`id`),
+ KEY `password` (`password`),
+ FULLTEXT KEY `name` (`name`)
+) ENGINE=MyISAM ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `user_metadata`
+--
+
+CREATE TABLE `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 ;