From 707397580c1c4547c0e308f90df61bc68e91b219 Mon Sep 17 00:00:00 2001
From: friendica <info@friendica.com>
Date: Mon, 3 Dec 2012 21:30:36 -0800
Subject: DB UPDATE! Drop your mail table and reload it from
 install/database.sql

---
 install/database.sql | 30 +++++++++---------------------
 1 file changed, 9 insertions(+), 21 deletions(-)

(limited to 'install/database.sql')

diff --git a/install/database.sql b/install/database.sql
index 7ab8625db..bcdf969c4 100644
--- a/install/database.sql
+++ b/install/database.sql
@@ -593,35 +593,23 @@ CREATE TABLE IF NOT EXISTS `item_id` (
 
 CREATE TABLE IF NOT EXISTS `mail` (
   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
-  `aid` int(10) unsigned NOT NULL DEFAULT '0',
-  `uid` int(10) unsigned NOT NULL,
-  `guid` char(64) NOT NULL,
-  `from-name` char(255) NOT NULL,
-  `from-photo` char(255) NOT NULL,
-  `from-url` char(255) NOT NULL,
-  `contact-id` char(255) NOT NULL,
-  `convid` int(11) NOT NULL,
+  `mail_flags` int(10) unsigned NOT NULL DEFAULT '0',
+  `author_xchan` char(255) NOT NULL DEFAULT '',
+  `account_id` int(10) unsigned NOT NULL DEFAULT '0',
+  `channel_id` int(10) unsigned NOT NULL,
   `title` char(255) NOT NULL,
   `body` mediumtext NOT NULL,
-  `seen` tinyint(1) NOT NULL,
-  `reply` tinyint(1) NOT NULL DEFAULT '0',
-  `replied` tinyint(1) NOT NULL,
-  `unknown` tinyint(1) NOT NULL DEFAULT '0',
   `uri` char(255) NOT NULL,
   `parent_uri` char(255) NOT NULL,
   `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
   PRIMARY KEY (`id`),
-  KEY `reply` (`reply`),
-  KEY `uid` (`uid`),
-  KEY `guid` (`guid`),
-  KEY `seen` (`seen`),
   KEY `uri` (`uri`),
   KEY `created` (`created`),
-  KEY `convid` (`convid`),
-  KEY `unknown` (`unknown`),
-  KEY `contact-id` (`contact-id`),
-  KEY `parent_uri` (`parent_uri`),
-  KEY `aid` (`aid`)
+  KEY `mail_flags` (`mail_flags`),
+  KEY `author_xchan` (`author_xchan`),
+  KEY `account_id` (`account_id`),
+  KEY `channel_id` (`channel_id`),
+  KEY `parent_uri` (`parent_uri`)
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
 
 CREATE TABLE IF NOT EXISTS `manage` (
-- 
cgit v1.2.3

