Index: trunk/core/install/install_schema.sql
===================================================================
diff -u -r8092 -r8397
--- trunk/core/install/install_schema.sql	(.../install_schema.sql)	(revision 8092)
+++ trunk/core/install/install_schema.sql	(.../install_schema.sql)	(revision 8397)
@@ -61,7 +61,6 @@
 CREATE TABLE EmailMessage (
   EmailMessageId int(10) NOT NULL auto_increment,
   Template longtext,
-  ReplacementTags text,
   MessageType enum('html','text') NOT NULL default 'text',
   LanguageId int(11) NOT NULL default '0',
   EventId int(11) NOT NULL default '0',
@@ -70,12 +69,17 @@
 );
 
 CREATE TABLE EmailQueue (
-  Subject text,
-  toaddr text,
-  fromaddr text,
-  message blob,
-  headers blob,
-  queued timestamp NOT NULL
+  EmailQueueId int(10) unsigned NOT NULL auto_increment,
+  ToEmail varchar(255) NOT NULL default '',
+  `Subject` varchar(255) NOT NULL default '',
+  MessageHeaders text,
+  MessageBody longtext,
+  Queued int(10) unsigned NOT NULL default '0',
+  SendRetries int(10) unsigned NOT NULL default '0',
+  LastSendRetry int(10) unsigned NOT NULL default '0',
+  PRIMARY KEY  (EmailQueueId),
+  KEY LastSendRetry (LastSendRetry),
+  KEY SendRetries (SendRetries)
 );
 
 CREATE TABLE EmailSubscribers (
@@ -86,6 +90,7 @@
 CREATE TABLE Events (
   EventId int(11) NOT NULL auto_increment,
   Event varchar(40) NOT NULL default '',
+  ReplacementTags text,
   Enabled int(11) NOT NULL default '1',
   FromUserId int(11) NOT NULL default '-1',
   Module varchar(40) NOT NULL default '',
@@ -433,3 +438,14 @@
   PRIMARY KEY  (CounterId),
   UNIQUE KEY Name (Name)
 );
+
+CREATE TABLE Skins (
+  `SkinId` int(11) NOT NULL auto_increment,
+  `Name` varchar(255) default NULL,
+  `CSS` text,
+  `Logo` varchar(255) default NULL,
+  `Options` text,
+  `LastCompiled` int(11) NOT NULL default '0',
+  `IsPrimary` int(1) NOT NULL default '0',
+  PRIMARY KEY  (`SkinId`)
+);
