--
-- Host: localhost    Database: pinstrip_rc
-- ------------------------------------------------------


--
-- Current Database: `pinstrip_rc`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `pinstrip_rc` /*!40100 DEFAULT CHARACTER SET latin1 */;

USE `pinstrip_rc`;

--
-- Table structure for table `cache`
--

CREATE TABLE `cache` (
  `cache_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cache_key` varchar(128) CHARACTER SET ascii NOT NULL,
  `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `data` longtext NOT NULL,
  `user_id` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`cache_id`),
  KEY `created_index` (`created`),
  KEY `user_cache_index` (`user_id`,`cache_key`),
  CONSTRAINT `user_id_fk_cache` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `cache`
--


--
-- Table structure for table `contactgroupmembers`
--

CREATE TABLE `contactgroupmembers` (
  `contactgroup_id` int(10) unsigned NOT NULL,
  `contact_id` int(10) unsigned NOT NULL DEFAULT '0',
  `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  PRIMARY KEY (`contactgroup_id`,`contact_id`),
  KEY `contact_id_fk_contacts` (`contact_id`),
  CONSTRAINT `contactgroup_id_fk_contactgroups` FOREIGN KEY (`contactgroup_id`) REFERENCES `contactgroups` (`contactgroup_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `contact_id_fk_contacts` FOREIGN KEY (`contact_id`) REFERENCES `contacts` (`contact_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `contactgroupmembers`
--


--
-- Table structure for table `contactgroups`
--

CREATE TABLE `contactgroups` (
  `contactgroup_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL DEFAULT '0',
  `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `del` tinyint(1) NOT NULL DEFAULT '0',
  `name` varchar(128) NOT NULL DEFAULT '',
  PRIMARY KEY (`contactgroup_id`),
  KEY `contactgroups_user_index` (`user_id`,`del`),
  CONSTRAINT `user_id_fk_contactgroups` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `contactgroups`
--


--
-- Table structure for table `contacts`
--

CREATE TABLE `contacts` (
  `contact_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `del` tinyint(1) NOT NULL DEFAULT '0',
  `name` varchar(128) NOT NULL DEFAULT '',
  `email` varchar(255) NOT NULL,
  `firstname` varchar(128) NOT NULL DEFAULT '',
  `surname` varchar(128) NOT NULL DEFAULT '',
  `vcard` text,
  `user_id` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`contact_id`),
  KEY `user_contacts_index` (`user_id`,`email`),
  CONSTRAINT `user_id_fk_contacts` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `contacts`
--

INSERT INTO `contacts` VALUES (1,'2011-07-13 08:13:03',0,'Marvin Valladares','marv@pinstripemag.com','Marvin','Valladares',NULL,6),(2,'2011-07-13 12:05:17',0,'Ronald Lee','ron@pinstripemag.com','Ronald','Lee',NULL,6);

--
-- Table structure for table `identities`
--

CREATE TABLE `identities` (
  `identity_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL DEFAULT '0',
  `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `del` tinyint(1) NOT NULL DEFAULT '0',
  `standard` tinyint(1) NOT NULL DEFAULT '0',
  `name` varchar(128) NOT NULL,
  `organization` varchar(128) NOT NULL DEFAULT '',
  `email` varchar(128) NOT NULL,
  `reply-to` varchar(128) NOT NULL DEFAULT '',
  `bcc` varchar(128) NOT NULL DEFAULT '',
  `signature` text,
  `html_signature` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`identity_id`),
  KEY `user_identities_index` (`user_id`,`del`),
  CONSTRAINT `user_id_fk_identities` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `identities`
--

INSERT INTO `identities` VALUES (1,1,'2011-07-13 22:43:49',0,1,'Marv Valladares','Pinstripe Magazine','marv@pinstripemag.com','marv@pinstripemag.com','','<pre>___________________________________\r\n<strong>Marv Valladares&nbsp;</strong></pre>\r\n<pre><strong>Editor-in-Chief&nbsp;</strong></pre>\r\n<pre><strong>Pinstripe Magazine<br /></strong>475 Elm Street, ste. 1C\r\n</pre>\r\n<pre>Kearny, NJ 07032<br />Email. marv@pinstripemag.com</pre>\r\n<pre>Tel. 646-494-PMAG (7624)\r\nCell. 201-310-5398</pre>\r\n<p><img src=\"http://www.pinstripemag.com/pinstripemag-sig.png\" alt=\"Pinstripe Magazine\" longdesc=\"http://www.pinstripemag.com/\" width=\"200\" height=\"30\" /><br /><span class=\"Apple-style-span\" style=\"white-space: pre-wrap;\"><a href=\"http://www.pinstripemag.com\"><strong>www.pinstripemag.com</strong><br /></a></span><strong><span><a href=\"http://www.twitter.com/pinstripemag\" target=\"_blank\">twitter.com/pinstripemag</a><br /></span></strong><strong><a href=\"http://www.facebook.com/pinstripemagazine\" target=\"_blank\">facebook.com/pinstripemagazine</a></strong></p>\r\n<p><span style=\"font-size: xx-small;\"><strong>*******<br />Breach of confidentiality &amp; accidental breach of confidentiality<br /></strong>This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.</span></p>',1),(2,2,'2011-07-01 12:40:45',0,1,'','','jewell@pinstripemag.com','','',NULL,0),(3,3,'2011-07-05 12:43:07',0,1,'','','girls@pinstripemag.com','','',NULL,0),(4,4,'2011-07-14 12:52:36',0,1,'Information','Pinstripe Magazine','info@pinstripemag.com','info@pinstripemag.com','','<p><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><strong>PINSTRIPE MAGAZINE</strong><br /></span><span style=\"font-family: Arial;\"><a href=\"http://www.pinstripemag.com/\"><span style=\"font-family: Arial;\">Email: info@pinstripemag.com<br />Main: 646.494.PMAG (7624)<br /><br style=\"font-family: Arial;\" /></span></a></span></span><strong></strong><img src=\"http://www.pinstripemag.com/pinstripemag-sig.png\" alt=\"Pinstripe Magazine\" longdesc=\"http://www.pinstripemag.com/\" width=\"200\" height=\"30\" /><strong><span style=\"font-family: Arial; font-size: x-small;\"><a href=\"http://www.pinstripemag.com/\"><br /></a></span></strong><span style=\"font-family: Arial; font-size: x-small;\"><a href=\"http://www.pinstripemag.com/\"><span style=\"font-size: small;\">www.PinstripeMag.com</span></a></span><span style=\"font-family: Arial; font-size: x-small;\"><br /><span style=\"font-size: small;\">twitter.com/pinstripemag</span><br /></span><span style=\"font-family: Arial; font-size: x-small;\"><span style=\"font-size: small;\">facebook.com/pinstripemagazine</span></span><strong><span style=\"font-family: Arial; font-size: x-small;\"><span style=\"font-size: small;\"><br /><br />*******</span></span></strong><span style=\"font-family: Arial; font-size: xx-small;\"><strong><br />Breach of confidentiality &amp; accidental breach of confidentiality<br /></strong>This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.</span></p>',1),(5,5,'2011-07-12 09:54:55',0,1,'','','advertise@pinstripemag.com','','',NULL,0),(6,6,'2011-07-14 12:33:57',0,1,'Ron Lee','Pinstripe Magazine','ron@pinstripemag.com','ron@pinstripemag.com','','<p><span style=\"font-family: Arial; font-size: small;\"><strong>Ronald Lee</strong><br /><strong>Art Director &amp; Managing Editor</strong></span><br /><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><strong>PINSTRIPE MAGAZINE</strong><br /></span><span style=\"font-family: Arial;\"><a href=\"http://www.pinstripemag.com/\"><span style=\"font-family: Arial;\">Email: ron@pinstripemag.com<br />Main: 646.494.PMAG (7624)<br />Cell: 201.390.1673</span></a></span></span><strong><span style=\"font-family: Arial; font-size: x-small;\"><a href=\"http://www.pinstripemag.com/\"><br /></a></span></strong></p>\r\n<p><img src=\"http://www.pinstripemag.com/pinstripemag-sig.png\" alt=\"Pinstripe Magazine\" longdesc=\"http://www.pinstripemag.com/\" width=\"200\" height=\"30\" /><strong><span style=\"font-family: Arial; font-size: x-small;\"><a href=\"http://www.pinstripemag.com/\"><br /></a></span></strong><span style=\"font-family: Arial; font-size: x-small;\"><a href=\"http://www.pinstripemag.com/\"><span style=\"font-size: small;\">www.PinstripeMag.com</span></a></span><span style=\"font-family: Arial; font-size: x-small;\"><br /><span style=\"font-size: small;\">twitter.com/pinstripemag</span><br /></span><span style=\"font-family: Arial; font-size: x-small;\"><span style=\"font-size: small;\">facebook.com/pinstripemagazine</span></span><strong><span style=\"font-family: Arial; font-size: x-small;\"><span style=\"font-size: small;\"><br /><br />*******</span></span></strong><span style=\"font-family: Arial; font-size: xx-small;\"><strong><br />Breach of confidentiality &amp; accidental breach of confidentiality<br /></strong>This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.</span></p>',1),(7,6,'2011-07-14 12:37:32',0,0,'Information','Pinstripe Magazine','info@pinstripemag.com','info@pinstripemag.com','','<p><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><strong>PINSTRIPE MAGAZINE</strong></span></span><strong><span style=\"font-family: Arial; font-size: x-small;\"><a href=\"http://www.pinstripemag.com/\"><br /></a></span></strong></p>\r\n<p><img src=\"http://www.pinstripemag.com/pinstripemag-sig.png\" alt=\"Pinstripe Magazine\" longdesc=\"http://www.pinstripemag.com/\" width=\"200\" height=\"30\" /><strong><span style=\"font-family: Arial; font-size: x-small;\"><a href=\"http://www.pinstripemag.com/\"><br /></a></span></strong><span style=\"font-family: Arial; font-size: x-small;\"><a href=\"http://www.pinstripemag.com/\"><span style=\"font-size: small;\">www.PinstripeMag.com</span></a></span><span style=\"font-family: Arial; font-size: x-small;\"><br /><span style=\"font-size: small;\">twitter.com/pinstripemag</span><br /></span><span style=\"font-family: Arial; font-size: x-small;\"><span style=\"font-size: small;\">facebook.com/pinstripemagazine</span></span><strong><span style=\"font-family: Arial; font-size: x-small;\"><span style=\"font-size: small;\"><br /><br />*******</span></span></strong><span style=\"font-family: Arial; font-size: xx-small;\"><strong><br />Breach of confidentiality &amp; accidental breach of confidentiality<br /></strong>This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.</span></p>',1),(8,7,'2011-07-14 12:56:00',0,1,'Comments','Pinstripe Magazine','comments@pinstripemag.com','comments@pinstripemag.com','','<p><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><strong>PINSTRIPE MAGAZINE</strong><br /></span><span style=\"font-family: Arial;\"><a href=\"http://www.pinstripemag.com/\"><span style=\"font-family: Arial;\">Email: comments@pinstripemag.com<br />Main: 646.494.PMAG (7624)<br /><br style=\"font-family: Arial;\" /></span></a></span></span><strong></strong><img src=\"http://www.pinstripemag.com/pinstripemag-sig.png\" alt=\"Pinstripe Magazine\" longdesc=\"http://www.pinstripemag.com/\" width=\"200\" height=\"30\" /><strong><span style=\"font-family: Arial; font-size: x-small;\"><a href=\"http://www.pinstripemag.com/\"><br /></a></span></strong><span style=\"font-family: Arial; font-size: x-small;\"><a href=\"http://www.pinstripemag.com/\"><span style=\"font-size: small;\">www.PinstripeMag.com</span></a></span><span style=\"font-family: Arial; font-size: x-small;\"><br /><span style=\"font-size: small;\">twitter.com/pinstripemag</span><br /></span><span style=\"font-family: Arial; font-size: x-small;\"><span style=\"font-size: small;\">facebook.com/pinstripemagazine</span></span><strong><span style=\"font-family: Arial; font-size: x-small;\"><span style=\"font-size: small;\"><br /><br />*******</span></span></strong><span style=\"font-family: Arial; font-size: xx-small;\"><strong><br />Breach of confidentiality &amp; accidental breach of confidentiality<br /></strong>This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.</span></p>',1);

--
-- Table structure for table `messages`
--

CREATE TABLE `messages` (
  `message_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL DEFAULT '0',
  `del` tinyint(1) NOT NULL DEFAULT '0',
  `cache_key` varchar(128) CHARACTER SET ascii NOT NULL,
  `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `idx` int(11) unsigned NOT NULL DEFAULT '0',
  `uid` int(11) unsigned NOT NULL DEFAULT '0',
  `subject` varchar(255) NOT NULL,
  `from` varchar(255) NOT NULL,
  `to` varchar(255) NOT NULL,
  `cc` varchar(255) NOT NULL,
  `date` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `size` int(11) unsigned NOT NULL DEFAULT '0',
  `headers` text NOT NULL,
  `structure` text,
  PRIMARY KEY (`message_id`),
  UNIQUE KEY `uniqueness` (`user_id`,`cache_key`,`uid`),
  KEY `created_index` (`created`),
  KEY `index_index` (`user_id`,`cache_key`,`idx`),
  CONSTRAINT `user_id_fk_messages` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `messages`
--


--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `user_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(128) NOT NULL,
  `mail_host` varchar(128) NOT NULL,
  `alias` varchar(128) NOT NULL,
  `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `last_login` datetime DEFAULT NULL,
  `language` varchar(5) DEFAULT NULL,
  `preferences` text,
  PRIMARY KEY (`user_id`),
  UNIQUE KEY `username` (`username`,`mail_host`),
  KEY `alias_index` (`alias`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `users`
--

INSERT INTO `users` VALUES (1,'marv@pinstripemag.com','pinstripemag.com','','2011-07-01 12:33:03','2011-07-15 09:56:56','en_US','a:11:{s:16:\"message_sort_col\";s:4:\"date\";s:18:\"message_sort_order\";s:4:\"DESC\";s:11:\"search_mods\";a:4:{s:1:\"*\";a:2:{s:7:\"subject\";i:1;s:4:\"from\";i:1;}s:4:\"Sent\";a:2:{s:7:\"subject\";i:1;s:2:\"to\";i:1;}s:6:\"Drafts\";a:2:{s:7:\"subject\";i:1;s:2:\"to\";i:1;}s:5:\"INBOX\";a:2:{s:7:\"subject\";i:1;s:4:\"from\";i:1;}}s:17:\"message_threading\";a:5:{s:5:\"INBOX\";b:1;s:6:\"Drafts\";b:1;s:4:\"Sent\";b:1;s:7:\"Blogger\";b:1;s:5:\"Trash\";b:1;}s:8:\"timezone\";s:2:\"-5\";s:8:\"pagesize\";i:60;s:10:\"htmleditor\";i:1;s:11:\"top_posting\";b:1;s:9:\"sig_above\";b:1;s:11:\"show_images\";i:2;s:12:\"preview_pane\";s:1:\"1\";}'),(2,'jewell@pinstripemag.com','pinstripemag.com','','2011-07-01 12:40:45','2011-07-05 12:36:31','en_US',NULL),(3,'girls@pinstripemag.com','pinstripemag.com','','2011-07-05 12:43:07','2011-07-15 13:14:32','en_US','a:1:{s:12:\"preview_pane\";s:1:\"1\";}'),(4,'info@pinstripemag.com','pinstripemag.com','','2011-07-12 09:37:35','2011-07-14 12:53:44','en_US','a:8:{s:17:\"message_threading\";a:6:{s:5:\"INBOX\";b:1;s:6:\"Events\";b:1;s:5:\"Trash\";b:1;s:6:\"Drafts\";b:1;s:4:\"Sent\";b:1;s:10:\"complaints\";b:1;}s:8:\"timezone\";s:2:\"-5\";s:10:\"dst_active\";b:0;s:8:\"pagesize\";i:60;s:11:\"top_posting\";b:1;s:9:\"sig_above\";b:1;s:11:\"show_images\";i:2;s:12:\"preview_pane\";s:1:\"1\";}'),(5,'advertise@pinstripemag.com','pinstripemag.com','','2011-07-12 09:54:55','2011-07-12 09:54:55','en_US',NULL),(6,'ron@pinstripemag.com','pinstripemag.com','','2011-07-13 08:11:37','2011-07-14 12:50:46','en_US','a:8:{s:10:\"htmleditor\";i:1;s:11:\"top_posting\";b:1;s:9:\"sig_above\";b:1;s:8:\"timezone\";s:2:\"-5\";s:8:\"pagesize\";i:60;s:17:\"message_threading\";a:3:{s:2:\"PR\";b:1;s:5:\"INBOX\";b:1;s:4:\"info\";b:1;}s:11:\"show_images\";i:2;s:12:\"preview_pane\";s:1:\"1\";}'),(7,'comments@pinstripemag.com','pinstripemag.com','','2011-07-14 12:52:53','2011-07-14 12:55:20','en_US','a:2:{s:11:\"show_images\";i:2;s:17:\"message_threading\";a:5:{s:5:\"INBOX\";b:1;s:6:\"Drafts\";b:1;s:4:\"Sent\";b:1;s:4:\"Junk\";b:1;s:5:\"Trash\";b:1;}}');


