From 6bbeab62150bd2e3d4ee79018608be2dcc591d2c Mon Sep 17 00:00:00 2001
From: ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>
Date: Fri, 7 Mar 2008 18:23:10 +0000
Subject: Users and friends

git-svn-id: https://code.elgg.org/elgg/trunk@108 36083f99-b078-4883-b0ff-0f9b5a30f544
---
 engine/schema/mysql.sql | 28 +++++++++++++++++++++++++---
 1 file changed, 25 insertions(+), 3 deletions(-)

(limited to 'engine/schema/mysql.sql')

diff --git a/engine/schema/mysql.sql b/engine/schema/mysql.sql
index 2ce3f71e4..5ba16d344 100644
--- a/engine/schema/mysql.sql
+++ b/engine/schema/mysql.sql
@@ -106,10 +106,9 @@ CREATE TABLE `prefix_users` (
   `username` varchar(12) NOT NULL default '',
   `password` varchar(32) NOT NULL default '',
   `email` text NOT NULL,
+  `language` varchar(6)  NOT NULL default '',
   `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',
+  `created` int(11) NOT NULL default '0',
   `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',
@@ -141,6 +140,29 @@ CREATE TABLE `prefix_sites` (
   PRIMARY KEY  (`id`)
 ) ENGINE=MyISAM ;
 
+--
+-- Link table between users and sites
+--
+
+CREATE TABLE `prefix_users_sites` (
+  `user_id` int(11) NOT NULL,
+  `site_id` int(11) NOT NULL,
+  PRIMARY KEY  (`user_id`,`site_id`)
+) ENGINE=MyISAM ;
+
+--
+-- Table structure for friends
+--
+
+CREATE TABLE `prefix_friends` (
+  `id` int(11) NOT NULL auto_increment,
+  `user_id` int(11) NOT NULL,
+  `friend_id` int(11) NOT NULL,
+  `site_id` int(11) NOT NULL,
+  PRIMARY KEY  (`id`),
+  KEY `user_id` (`user_id`),
+  KEY `friend_id` (`friend_id`)
+) ENGINE=MyISAM;
 
 -- 
 -- Table structure for annotations
-- 
cgit v1.2.3

