-- phpMyAdmin SQL Dump
-- version 2.9.1.1-Debian-7
-- http://www.phpmyadmin.net
-- 
-- Host: localhost
-- Generation Time: Aug 12, 2008 at 04:25 PM
-- Server version: 5.0.32
-- PHP Version: 5.2.0-8+etch11
-- 
-- Database: `crm_firefly`
-- 

-- --------------------------------------------------------

-- 
-- Table structure for table `action`
-- 

CREATE TABLE `action` (
  `id` int(11) NOT NULL auto_increment,
  `contact_id` int(11) default '0',
  `group_id` int(11) default '0',
  `type` varchar(100) NOT NULL default '',
  `title` varchar(250) NOT NULL default '',
  `detail` text NOT NULL,
  `date_target` date default NULL,
  `date_completed` date default NULL,
  `time` varchar(100) default NULL,
  `priority` varchar(11) NOT NULL default '',
  `assigned_contact_id` int(11) default '0',
  PRIMARY KEY  (`id`),
  FULLTEXT KEY `time` (`time`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2030 ;

-- --------------------------------------------------------

-- 
-- Table structure for table `cities`
-- 

CREATE TABLE `cities` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=57 ;

-- --------------------------------------------------------

-- 
-- Table structure for table `comments_actions`
-- 

CREATE TABLE `comments_actions` (
  `comment_id` int(11) NOT NULL auto_increment,
  `contact_id` int(11) NOT NULL default '0',
  `comment` varchar(150) NOT NULL default '',
  `comment_date` date NOT NULL default '0000-00-00',
  `action_date` date NOT NULL default '0000-00-00',
  PRIMARY KEY  (`comment_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

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

CREATE TABLE `contacts` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(30) default NULL,
  `company_name` varchar(30) default NULL,
  `position` varchar(30) NOT NULL default '',
  `address_1` varchar(30) default NULL,
  `address_2` varchar(30) default NULL,
  `address_3` varchar(30) default NULL,
  `city` varchar(30) default NULL,
  `post_code` varchar(10) default NULL,
  `tel_main` varchar(20) default NULL,
  `tel_alternative` varchar(20) default NULL,
  `e_mail` varchar(30) default NULL,
  `alt_e_mail` varchar(30) default NULL,
  `www` varchar(30) default NULL,
  `fax` varchar(30) default NULL,
  `group_id` int(11) default '0',
  `spam_me` tinyint(1) default '0',
  `password` varchar(30) default NULL,
  `no_employees` int(11) default NULL,
  `industry` varchar(30) default NULL,
  `status_id` int(10) default NULL,
  `notes_id` int(11) default NULL,
  PRIMARY KEY  (`id`),
  FULLTEXT KEY `company_name` (`company_name`),
  FULLTEXT KEY `company_name_2` (`company_name`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2164 ;

-- --------------------------------------------------------

-- 
-- Table structure for table `e_mail_history`
-- 

CREATE TABLE `e_mail_history` (
  `id` int(11) NOT NULL auto_increment,
  `email_to` varchar(250) default NULL,
  `group_to` int(11) NOT NULL default '0',
  `subject` varchar(250) NOT NULL default '',
  `email_text` text NOT NULL,
  `date` date NOT NULL default '0000-00-00',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ;

-- --------------------------------------------------------

-- 
-- Table structure for table `glossary`
-- 

CREATE TABLE `glossary` (
  `id` int(10) NOT NULL auto_increment,
  `term` varchar(255) NOT NULL default '',
  `short_desc` text NOT NULL,
  `long_desc` text NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=43 ;

-- --------------------------------------------------------

-- 
-- Table structure for table `groups`
-- 

CREATE TABLE `groups` (
  `group_id` int(11) NOT NULL auto_increment,
  `group_name` varchar(40) default NULL,
  PRIMARY KEY  (`group_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=51 ;

-- --------------------------------------------------------

-- 
-- Table structure for table `list_names`
-- 

CREATE TABLE `list_names` (
  `list_id` int(255) NOT NULL auto_increment,
  `list_name` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`list_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;

-- --------------------------------------------------------

-- 
-- Table structure for table `lists`
-- 

CREATE TABLE `lists` (
  `id` int(8) NOT NULL auto_increment,
  `e_mail` varchar(255) default NULL,
  `spam_me` varchar(255) default NULL,
  `list_id` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=30 ;

-- --------------------------------------------------------

-- 
-- Table structure for table `notes`
-- 

CREATE TABLE `notes` (
  `id` int(11) NOT NULL auto_increment,
  `notes` varchar(200) default NULL,
  `date` int(26) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

-- --------------------------------------------------------

-- 
-- Table structure for table `random_text`
-- 

CREATE TABLE `random_text` (
  `id` int(10) NOT NULL auto_increment,
  `random_text` text NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `id` (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=23 ;

-- --------------------------------------------------------

-- 
-- Table structure for table `seo_tags`
-- 

CREATE TABLE `seo_tags` (
  `id` int(11) NOT NULL auto_increment,
  `seo_tag` text NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ;

-- --------------------------------------------------------

-- 
-- Table structure for table `status`
-- 

CREATE TABLE `status` (
  `id` int(11) NOT NULL auto_increment,
  `status` varchar(100) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;

-- --------------------------------------------------------

-- 
-- Table structure for table `tickets`
-- 

CREATE TABLE `tickets` (
  `id` int(10) NOT NULL auto_increment,
  `details` text NOT NULL,
  `status` varchar(255) NOT NULL default '',
  `completed` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;
