From c21600e85f148f41173c68d3024a4c1329b8ff58 Mon Sep 17 00:00:00 2001
From: icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>
Date: Mon, 10 Mar 2008 16:12:17 +0000
Subject: Marcus Povey <marcus@dushka.co.uk> * Tokens and execute code added to
 api

git-svn-id: https://code.elgg.org/elgg/trunk@140 36083f99-b078-4883-b0ff-0f9b5a30f544
---
 engine/schema/mysql.sql | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

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

diff --git a/engine/schema/mysql.sql b/engine/schema/mysql.sql
index 8563eed7e..dff19be35 100644
--- a/engine/schema/mysql.sql
+++ b/engine/schema/mysql.sql
@@ -119,6 +119,23 @@ CREATE TABLE `prefix_users` (
 ) ENGINE=MyISAM ;
 
 
+--
+-- User sessions
+-- 
+
+CREATE TABLE `prefix_users_apisessions` (
+	`id` int(11) NOT NULL auto_increment,
+	`user_id` int(11) NOT NULL,
+  	`site_id` int(11) NOT NULL,
+  	
+  	`token` varchar(40),
+  	
+  	`expires` int(11) NOT NULL,
+	
+	PRIMARY KEY  (`id`),
+	UNIQUE KEY (`user_id`,`site_id`)
+) ENGINE=MyISAM;
+
 -- --------------------------------------------------------
 
 --
@@ -215,7 +232,7 @@ CREATE TABLE `prefix_api_users` (
 	id     int(11)     auto_increment,
 	
 	email_address varchar(128),
-	
+	site_id	  int(11),
 	api_key   varchar(40),
 	secret    varchar(40) NOT NULL,
 	active    int default 1,
-- 
cgit v1.2.3

