-- phpMyAdmin SQL Dump
-- version 4.2.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jan 11, 2015 at 03:54 PM
-- Server version: 5.5.32
-- PHP Version: 5.4.16

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `api_freelance`
--

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

--
-- Table structure for table `fx_account_details`
--

CREATE TABLE IF NOT EXISTS `fx_account_details` (
`id` bigint(20) unsigned NOT NULL,
  `user_id` int(11) NOT NULL,
  `fullname` varchar(160) COLLATE utf8_unicode_ci DEFAULT NULL,
  `company` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `city` varchar(40) COLLATE utf8_unicode_ci DEFAULT NULL,
  `country` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `address` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `phone` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `vat` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `language` varchar(40) COLLATE utf8_unicode_ci DEFAULT 'english',
  `department` int(11) NOT NULL,
  `avatar` varchar(32) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'default_avatar.jpg',
  `allowed_modules` text COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC AUTO_INCREMENT=2 ;

--
-- Truncate table before insert `fx_account_details`
--

TRUNCATE TABLE `fx_account_details`;
--
-- Dumping data for table `fx_account_details`
--

INSERT INTO `fx_account_details` (`id`, `user_id`, `fullname`, `company`, `city`, `country`, `address`, `phone`, `vat`, `language`, `department`, `avatar`, `allowed_modules`) VALUES
(1, 1, 'John Doe', '', '', 'United Kingdom', '', '', '', 'english', 0, 'default_avatar.jpg', '');

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

--
-- Table structure for table `fx_activities`
--

CREATE TABLE IF NOT EXISTS `fx_activities` (
`activity_id` int(11) NOT NULL,
  `user` int(11) NOT NULL,
  `module` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `module_field_id` int(11) NOT NULL,
  `activity` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `activity_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `icon` varchar(32) COLLATE utf8_unicode_ci DEFAULT 'fa-coffee',
  `deleted` int(11) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

--
-- Truncate table before insert `fx_activities`
--

TRUNCATE TABLE `fx_activities`;
-- --------------------------------------------------------

--
-- Table structure for table `fx_api_keys`
--

CREATE TABLE IF NOT EXISTS `fx_api_keys` (
`id` int(11) NOT NULL,
  `user` int(11) NOT NULL,
  `api_key` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
  `level` int(2) NOT NULL,
  `ignore_limits` tinyint(1) NOT NULL DEFAULT '0',
  `is_private_key` tinyint(1) NOT NULL DEFAULT '0',
  `ip_addresses` text COLLATE utf8_unicode_ci,
  `date_created` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

--
-- Truncate table before insert `fx_api_keys`
--

TRUNCATE TABLE `fx_api_keys`;
-- --------------------------------------------------------

--
-- Table structure for table `fx_api_logs`
--

CREATE TABLE IF NOT EXISTS `fx_api_logs` (
`id` int(11) NOT NULL,
  `uri` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `method` varchar(6) COLLATE utf8_unicode_ci NOT NULL,
  `params` text COLLATE utf8_unicode_ci,
  `api_key` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
  `ip_address` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
  `time` int(11) NOT NULL,
  `rtime` float DEFAULT NULL,
  `authorized` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

--
-- Truncate table before insert `fx_api_logs`
--

TRUNCATE TABLE `fx_api_logs`;
-- --------------------------------------------------------

--
-- Table structure for table `fx_assign_projects`
--

CREATE TABLE IF NOT EXISTS `fx_assign_projects` (
`a_id` int(11) unsigned NOT NULL,
  `assigned_user` int(11) NOT NULL,
  `project_assigned` int(11) NOT NULL,
  `assign_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

--
-- Truncate table before insert `fx_assign_projects`
--

TRUNCATE TABLE `fx_assign_projects`;
-- --------------------------------------------------------

--
-- Table structure for table `fx_assign_tasks`
--

CREATE TABLE IF NOT EXISTS `fx_assign_tasks` (
`a_id` int(11) unsigned NOT NULL,
  `assigned_user` int(11) NOT NULL,
  `project_assigned` int(11) NOT NULL,
  `task_assigned` int(11) NOT NULL,
  `assign_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

--
-- Truncate table before insert `fx_assign_tasks`
--

TRUNCATE TABLE `fx_assign_tasks`;
-- --------------------------------------------------------

--
-- Table structure for table `fx_bugs`
--

CREATE TABLE IF NOT EXISTS `fx_bugs` (
`bug_id` int(11) NOT NULL,
  `issue_ref` int(11) NOT NULL,
  `project` int(11) NOT NULL,
  `reporter` int(11) NOT NULL,
  `assigned_to` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `bug_status` enum('Unconfirmed','Confirmed','In Progress','Resolved','Verified') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Unconfirmed',
  `issue_title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `reproducibility` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `severity` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `priority` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `bug_description` text COLLATE utf8_unicode_ci NOT NULL,
  `reported_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `last_modified` varchar(64) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

--
-- Truncate table before insert `fx_bugs`
--

TRUNCATE TABLE `fx_bugs`;
-- --------------------------------------------------------

--
-- Table structure for table `fx_bug_comments`
--

CREATE TABLE IF NOT EXISTS `fx_bug_comments` (
`c_id` int(11) NOT NULL,
  `bug_id` int(11) NOT NULL,
  `comment_by` int(11) NOT NULL,
  `comment` text COLLATE utf8_unicode_ci NOT NULL,
  `date_commented` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

--
-- Truncate table before insert `fx_bug_comments`
--

TRUNCATE TABLE `fx_bug_comments`;
-- --------------------------------------------------------

--
-- Table structure for table `fx_bug_files`
--

CREATE TABLE IF NOT EXISTS `fx_bug_files` (
`file_id` int(11) NOT NULL,
  `bug` int(11) NOT NULL,
  `file_name` text COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `uploaded_by` int(11) NOT NULL,
  `date_posted` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

--
-- Truncate table before insert `fx_bug_files`
--

TRUNCATE TABLE `fx_bug_files`;
-- --------------------------------------------------------

--
-- Table structure for table `fx_captcha`
--

CREATE TABLE IF NOT EXISTS `fx_captcha` (
`captcha_id` bigint(13) unsigned NOT NULL,
  `captcha_time` int(10) unsigned NOT NULL,
  `ip_address` varchar(16) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
  `word` varchar(20) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;

--
-- Truncate table before insert `fx_captcha`
--

TRUNCATE TABLE `fx_captcha`;
--
-- Dumping data for table `fx_captcha`
--

INSERT INTO `fx_captcha` (`captcha_id`, `captcha_time`, `ip_address`, `word`) VALUES
(1, 1420987768, '::1', 'LXNBC8yG');

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

--
-- Table structure for table `fx_comments`
--

CREATE TABLE IF NOT EXISTS `fx_comments` (
`comment_id` int(11) NOT NULL,
  `project` int(11) NOT NULL,
  `posted_by` int(11) NOT NULL,
  `message` text COLLATE utf8_unicode_ci NOT NULL,
  `date_posted` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `deleted` enum('Yes','No') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'No'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

--
-- Truncate table before insert `fx_comments`
--

TRUNCATE TABLE `fx_comments`;
-- --------------------------------------------------------

--
-- Table structure for table `fx_comment_replies`
--

CREATE TABLE IF NOT EXISTS `fx_comment_replies` (
`reply_id` int(11) NOT NULL,
  `parent_comment` int(11) NOT NULL,
  `reply_msg` text COLLATE utf8_unicode_ci NOT NULL,
  `replied_by` int(11) NOT NULL,
  `del` enum('Yes','No') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'No',
  `date_posted` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

--
-- Truncate table before insert `fx_comment_replies`
--

TRUNCATE TABLE `fx_comment_replies`;
-- --------------------------------------------------------

--
-- Table structure for table `fx_companies`
--

CREATE TABLE IF NOT EXISTS `fx_companies` (
`co_id` int(11) unsigned NOT NULL,
  `company_ref` int(32) NOT NULL,
  `company_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `primary_contact` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `company_email` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `company_website` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `company_phone` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `company_address` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `city` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `country` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `VAT` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `hosting_company` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `hostname` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `port` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `account_password` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `account_username` varchar(100) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

--
-- Truncate table before insert `fx_companies`
--

TRUNCATE TABLE `fx_companies`;
-- --------------------------------------------------------

--
-- Table structure for table `fx_config`
--

CREATE TABLE IF NOT EXISTS `fx_config` (
  `config_key` varchar(255) NOT NULL,
  `value` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Truncate table before insert `fx_config`
--

TRUNCATE TABLE `fx_config`;
--
-- Dumping data for table `fx_config`
--

INSERT INTO `fx_config` (`config_key`, `value`) VALUES
('allowed_files', 'gif|jpg|png|pdf|doc|txt|docx|xls|zip|rar'),
('allow_client_registration', 'TRUE'),
('automatic_email_on_recur', 'TRUE'),
('base_url', '%BaseURL%'),
('button_color', 'info'),
('client_create_project', 'TRUE'),
('company_address', '4146 Golden Hickory Woods'),
('company_city', 'Glass Hill, Sydney'),
('company_country', 'Australia'),
('company_domain', '%BaseURL%'),
('company_email', '%CompanyEmail%'),
('company_logo', 'logo.png'),
('company_name', 'Gitbench Inc.'),
('company_phone', '+123 456 789'),
('company_vat', ''),
('contact_person', 'John Doe'),
('cron_key', '34WI2L12L87I1A65M90M9A42N41D08A26I'),
('date_format', '%b %d, %Y'),
('decimal_separator', '.'),
('default_currency', 'EUR'),
('default_currency_symbol', '$'),
('default_tax', '21'),
('default_terms', 'Thank you for your business. Please process this invoice within the due date.'),
('demo_mode', 'FALSE'),
('developer', 'ig63Yd/+yuA8127gEyTz9TY4pnoeKq8dtocVP44+BJvtlRp8Vqcetwjk51dhSB6Rx8aVIKOPfUmNyKGWK7C/gg=='),
('display_invoice_badge', 'TRUE'),
('email_account_details', 'TRUE'),
('email_estimate_message', 'Hi {CLIENT}<br>Thanks for your business inquiry. <br>The estimate EST {REF} is attached with this email. <br>Estimate Overview:<br>Estimate # : EST {REF}<br>Amount: {CURRENCY} {AMOUNT}<br> You can view the estimate online at:<br>{LINK}<br>Best Regards,<br>{COMPANY}'),
('email_invoice_message', 'Hello {CLIENT}<br>Here is the invoice of {CURRENCY} {AMOUNT}<br>You can view the invoice online at:<br>{LINK}<br>Best Regards,<br>{COMPANY}'),
('email_staff_tickets', 'TRUE'),
('estimate_color', '#FB6B5B'),
('file_max_size', '80000'),
('increment_invoice_number', 'TRUE'),
('invoices_due_after', '30'),
('invoice_color', '#53B567'),
('invoice_language', 'en'),
('invoice_logo', 'invoice_logo.png'),
('language', 'english'),
('notify_bug_assignment', 'TRUE'),
('notify_bug_comments', 'TRUE'),
('notify_project_assignments', 'TRUE'),
('notify_project_comments', 'TRUE'),
('notify_project_files', 'TRUE'),
('notify_task_assignments', 'TRUE'),
('paypal_cancel_url', 'paypal/cancel'),
('paypal_email', '%CompanyEmail%'),
('paypal_ipn_url', 'paypal/t_ipn/ipn'),
('paypal_live', 'FALSE'),
('paypal_success_url', 'paypal/success'),
('protocol', 'mail'),
('reminder_message', 'Hello {CLIENT}<br>This is a friendly reminder to pay your invoice of {CURRENCY} {AMOUNT}<br>You can view the invoice online at:<br>{LINK}<br>Best Regards,<br>{COMPANY}'),
('reset_key', '34WI2L12L87I1A65M90M9A42N41D08A26I'),
('show_login_image', 'TRUE'),
('sidebar_theme', 'light lter'),
('site_author', 'William M.'),
('site_desc', 'Freelancer Office is a Web based PHP application for Freelancers - buy it on Codecanyon'),
('smtp_host', ''),
('smtp_pass', '5kdE/cgER/aBcRZV1FX5HmhPhym3mmlcPyk6IxSha+dpWN5JaVnTwuMoLM45loyQpwGLUFCi+A66nLETHTgKqA=='),
('smtp_port', '25'),
('smtp_user', ''),
('stripe_private_key', ' sk_test_tV5LwTRLk8yYcM94iMONLdFf '),
('stripe_public_key', 'pk_test_8t8Ck9sDuSRa2vps1KJlnjTT'),
('thousand_separator', ','),
('use_postmark', 'FALSE'),
('webmaster_email', '%CompanyEmail%'),
('website_name', 'Freelancer Office');

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

--
-- Table structure for table `fx_countries`
--

CREATE TABLE IF NOT EXISTS `fx_countries` (
`id` int(6) NOT NULL,
  `value` varchar(250) CHARACTER SET latin1 NOT NULL DEFAULT ''
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=243 ;

--
-- Truncate table before insert `fx_countries`
--

TRUNCATE TABLE `fx_countries`;
--
-- Dumping data for table `fx_countries`
--

INSERT INTO `fx_countries` (`id`, `value`) VALUES
(1, 'Afghanistan'),
(2, 'Aringland Islands'),
(3, 'Albania'),
(4, 'Algeria'),
(5, 'American Samoa'),
(6, 'Andorra'),
(7, 'Angola'),
(8, 'Anguilla'),
(9, 'Antarctica'),
(10, 'Antigua and Barbuda'),
(11, 'Argentina'),
(12, 'Armenia'),
(13, 'Aruba'),
(14, 'Australia'),
(15, 'Austria'),
(16, 'Azerbaijan'),
(17, 'Bahamas'),
(18, 'Bahrain'),
(19, 'Bangladesh'),
(20, 'Barbados'),
(21, 'Belarus'),
(22, 'Belgium'),
(23, 'Belize'),
(24, 'Benin'),
(25, 'Bermuda'),
(26, 'Bhutan'),
(27, 'Bolivia'),
(28, 'Bosnia and Herzegovina'),
(29, 'Botswana'),
(30, 'Bouvet Island'),
(31, 'Brazil'),
(32, 'British Indian Ocean territory'),
(33, 'Brunei Darussalam'),
(34, 'Bulgaria'),
(35, 'Burkina Faso'),
(36, 'Burundi'),
(37, 'Cambodia'),
(38, 'Cameroon'),
(39, 'Canada'),
(40, 'Cape Verde'),
(41, 'Cayman Islands'),
(42, 'Central African Republic'),
(43, 'Chad'),
(44, 'Chile'),
(45, 'China'),
(46, 'Christmas Island'),
(47, 'Cocos (Keeling) Islands'),
(48, 'Colombia'),
(49, 'Comoros'),
(50, 'Congo'),
(51, 'Congo'),
(52, ' Democratic Republic'),
(53, 'Cook Islands'),
(54, 'Costa Rica'),
(55, 'Ivory Coast (Ivory Coast)'),
(56, 'Croatia (Hrvatska)'),
(57, 'Cuba'),
(58, 'Cyprus'),
(59, 'Czech Republic'),
(60, 'Denmark'),
(61, 'Djibouti'),
(62, 'Dominica'),
(63, 'Dominican Republic'),
(64, 'East Timor'),
(65, 'Ecuador'),
(66, 'Egypt'),
(67, 'El Salvador'),
(68, 'Equatorial Guinea'),
(69, 'Eritrea'),
(70, 'Estonia'),
(71, 'Ethiopia'),
(72, 'Falkland Islands'),
(73, 'Faroe Islands'),
(74, 'Fiji'),
(75, 'Finland'),
(76, 'France'),
(77, 'French Guiana'),
(78, 'French Polynesia'),
(79, 'French Southern Territories'),
(80, 'Gabon'),
(81, 'Gambia'),
(82, 'Georgia'),
(83, 'Germany'),
(84, 'Ghana'),
(85, 'Gibraltar'),
(86, 'Greece'),
(87, 'Greenland'),
(88, 'Grenada'),
(89, 'Guadeloupe'),
(90, 'Guam'),
(91, 'Guatemala'),
(92, 'Guinea'),
(93, 'Guinea-Bissau'),
(94, 'Guyana'),
(95, 'Haiti'),
(96, 'Heard and McDonald Islands'),
(97, 'Honduras'),
(98, 'Hong Kong'),
(99, 'Hungary'),
(100, 'Iceland'),
(101, 'India'),
(102, 'Indonesia'),
(103, 'Iran'),
(104, 'Iraq'),
(105, 'Ireland'),
(106, 'Israel'),
(107, 'Italy'),
(108, 'Jamaica'),
(109, 'Japan'),
(110, 'Jordan'),
(111, 'Kazakhstan'),
(112, 'Kenya'),
(113, 'Kiribati'),
(114, 'Korea (north)'),
(115, 'Korea (south)'),
(116, 'Kuwait'),
(117, 'Kyrgyzstan'),
(118, 'Lao People''s Democratic Republic'),
(119, 'Latvia'),
(120, 'Lebanon'),
(121, 'Lesotho'),
(122, 'Liberia'),
(123, 'Libyan Arab Jamahiriya'),
(124, 'Liechtenstein'),
(125, 'Lithuania'),
(126, 'Luxembourg'),
(127, 'Macao'),
(128, 'Macedonia'),
(129, 'Madagascar'),
(130, 'Malawi'),
(131, 'Malaysia'),
(132, 'Maldives'),
(133, 'Mali'),
(134, 'Malta'),
(135, 'Marshall Islands'),
(136, 'Martinique'),
(137, 'Mauritania'),
(138, 'Mauritius'),
(139, 'Mayotte'),
(140, 'Mexico'),
(141, 'Micronesia'),
(142, 'Moldova'),
(143, 'Monaco'),
(144, 'Mongolia'),
(145, 'Montserrat'),
(146, 'Morocco'),
(147, 'Mozambique'),
(148, 'Myanmar'),
(149, 'Namibia'),
(150, 'Nauru'),
(151, 'Nepal'),
(152, 'Netherlands'),
(153, 'Netherlands Antilles'),
(154, 'New Caledonia'),
(155, 'New Zealand'),
(156, 'Nicaragua'),
(157, 'Niger'),
(158, 'Nigeria'),
(159, 'Niue'),
(160, 'Norfolk Island'),
(161, 'Northern Mariana Islands'),
(162, 'Norway'),
(163, 'Oman'),
(164, 'Pakistan'),
(165, 'Palau'),
(166, 'Palestinian Territories'),
(167, 'Panama'),
(168, 'Papua New Guinea'),
(169, 'Paraguay'),
(170, 'Peru'),
(171, 'Philippines'),
(172, 'Pitcairn'),
(173, 'Poland'),
(174, 'Portugal'),
(175, 'Puerto Rico'),
(176, 'Qatar'),
(177, 'Runion'),
(178, 'Romania'),
(179, 'Russian Federation'),
(180, 'Rwanda'),
(181, 'Saint Helena'),
(182, 'Saint Kitts and Nevis'),
(183, 'Saint Lucia'),
(184, 'Saint Pierre and Miquelon'),
(185, 'Saint Vincent and the Grenadines'),
(186, 'Samoa'),
(187, 'San Marino'),
(188, 'Sao Tome and Principe'),
(189, 'Saudi Arabia'),
(190, 'Senegal'),
(191, 'Serbia and Montenegro'),
(192, 'Seychelles'),
(193, 'Sierra Leone'),
(194, 'Singapore'),
(195, 'Slovakia'),
(196, 'Slovenia'),
(197, 'Solomon Islands'),
(198, 'Somalia'),
(199, 'South Africa'),
(200, 'South Georgia and the South Sandwich Islands'),
(201, 'Spain'),
(202, 'Sri Lanka'),
(203, 'Sudan'),
(204, 'Suriname'),
(205, 'Svalbard and Jan Mayen Islands'),
(206, 'Swaziland'),
(207, 'Sweden'),
(208, 'Switzerland'),
(209, 'Syria'),
(210, 'Taiwan'),
(211, 'Tajikistan'),
(212, 'Tanzania'),
(213, 'Thailand'),
(214, 'Togo'),
(215, 'Tokelau'),
(216, 'Tonga'),
(217, 'Trinidad and Tobago'),
(218, 'Tunisia'),
(219, 'Turkey'),
(220, 'Turkmenistan'),
(221, 'Turks and Caicos Islands'),
(222, 'Tuvalu'),
(223, 'Uganda'),
(224, 'Ukraine'),
(225, 'United Arab Emirates'),
(226, 'United Kingdom'),
(227, 'United States of America'),
(228, 'Uruguay'),
(229, 'Uzbekistan'),
(230, 'Vanuatu'),
(231, 'Vatican City'),
(232, 'Venezuela'),
(233, 'Vietnam'),
(234, 'Virgin Islands (British)'),
(235, 'Virgin Islands (US)'),
(236, 'Wallis and Futuna Islands'),
(237, 'Western Sahara'),
(238, 'Yemen'),
(239, 'Zaire'),
(240, 'Zambia'),
(241, 'Zimbabwe');

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

--
-- Table structure for table `fx_departments`
--

CREATE TABLE IF NOT EXISTS `fx_departments` (
`deptid` int(10) NOT NULL,
  `deptname` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL,
  `depthidden` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

--
-- Truncate table before insert `fx_departments`
--

TRUNCATE TABLE `fx_departments`;
-- --------------------------------------------------------

--
-- Table structure for table `fx_email_templates`
--

CREATE TABLE IF NOT EXISTS `fx_email_templates` (
`template_id` int(11) NOT NULL,
  `email_group` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `template_body` text COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=25 ;

--
-- Truncate table before insert `fx_email_templates`
--

TRUNCATE TABLE `fx_email_templates`;
--
-- Dumping data for table `fx_email_templates`
--

INSERT INTO `fx_email_templates` (`template_id`, `email_group`, `template_body`) VALUES
(1, 'registration', '<h3>Welcome to {SITE_NAME}!</h3>\r\n<p>Thanks for joining {SITE_NAME}. We listed your sign in details below, make sure you keep them safe.<br>To open your {SITE_NAME} homepage, please follow this link:</p>\r\n <big><b><a href="{SITE_URL}">{SITE_NAME} Account!</a></b></big><p>Link doesn''t work? Copy the following link to your browser address bar:</p>\r\n <a href="{SITE_URL}">{SITE_URL}</a><br>Your username: {USERNAME}<br>Your email address: {EMAIL}<br>Your password: {PASSWORD}<br>Have fun!<br>The {SITE_NAME} Team'),
(2, 'forgot_password', '<h3>Create a new password</h3><p>Forgot your password, huh? No big deal.<br>To create a new password, just follow this link:<br><br><big><b><a href="{PASS_KEY_URL}">Create a new password</a></b></big><br>Link doesn''t work? Copy the following link to your browser address bar:<br><a href="{PASS_KEY_URL}">{PASS_KEY_URL}</a><br><br><br>You received this email, because it was requested by a <a href="{SITE_URL}">{SITE_NAME}</a> user. </p><p>This is part of the procedure to create a new password on the system. If you DID NOT request a new password then please ignore this email and your password will remain the same.</p><br>Thank you,<br>The {SITE_NAME} Team'),
(3, 'change_email', '<h3>Your new email address on {SITE_NAME}</h3>\r\n<p>You have changed your email address for {SITE_NAME}.<br>\r\nFollow this link to confirm your new email address:<br>\r\n<big><b><a href="{NEW_EMAIL_KEY_URL}">Confirm your new email</a></b></big></p><br>\r\nLink doesn''t work? Copy the following link to your browser address bar:<br>\r\n<a href="{NEW_EMAIL_KEY_URL}">{NEW_EMAIL_KEY_URL}</a>\r\n<br><br>Your email address: {NEW_EMAIL}<br><br>\r\nYou received this email, because it was requested by a <a href="{SITE_URL}">{SITE_NAME}</a> user. If you have received this by mistake, please DO NOT click the confirmation link, and simply delete this email. After a short time, the request will be removed from the system.<br>\r\nThank you,<br>\r\nThe {SITE_NAME} Team'),
(4, 'activate_account', '<h3>Welcome to {SITE_NAME}!</h3><p>Thanks for joining {SITE_NAME}. We listed your sign in details below, make sure you keep them safe.</p>To verify your email address, please follow this link:<br><big><b><a href="{ACTIVATE_URL}">Finish your registration...</a></b></big><br>Link doesn''t work? Copy the following link to your browser address bar:<br><a href="{ACTIVATE_URL}">{ACTIVATE_URL}</a><br><br>Please verify your email within {ACTIVATION_PERIOD} hours, otherwise your registration will become invalid and you will have to register again.<br><br><br>Your username: {USERNAME}<br>Your email address: {EMAIL}<br>Your password: {PASSWORD}<br><br>Have fun!<br>The {SITE_NAME} Team'),
(5, 'reset_password', '<h3>Your new password on {SITE_NAME}</h3><p>You have changed your password.<br>Please, keep it in your records so you don''t forget it.<br></p>Your username: {USERNAME}<br>Your email address: {EMAIL}<br>Your new password: {NEW_PASSWORD}<br><br>Thank you,<br>The {SITE_NAME} Team'),
(6, 'bug_assigned', '<h3>New Bug Assigned</h3>\r\n<p>Hi there,</p>\r\n<p>A new bug ( {ISSUE_TITLE} ) has been assigned to you by {ASSIGNED_BY} in project {PROJECT_TITLE}. </p>\r\n<p>You can view this bug by logging in to the portal using the link below.</p>\r\n--------------------------<br><big><b><a href="{SITE_URL}">My Account</a></b></big><br><br>Regards<br>The {SITE_NAME} Team'),
(7, 'bug_status', '<h3>Bug status changed</h3>\r\n<p>Hi there,</p>\r\n<p>Bug {ISSUE_TITLE} has been marked as {STATUS} by {MARKED_BY}. </p>\r\n<p>You can view this bug by logging in to the portal using the link below.</p>\r\n--------------------------<br><big><b><a href="{BUG_URL}">My Account</a></b></big><br>Regards<br>The {SITE_NAME} Team'),
(8, 'bug_comment', '<p>Hi there,</p>\r\n\r\n<p>A new comment has been posted by {POSTED_BY} to bug {ISSUE_TITLE}. </p>\r\n\r\n<p>You can view the comment using the link below.</p>\r\n\r\n----------------------------------------------------------<br>\r\n<big><b><a href="{COMMENT_URL}">View Comment</a></b></big><br>\r\nRegards<br>\r\nThe {SITE_NAME} Team'),
(9, 'bug_file', '<p>Hi there, </p><p>A new file has been uploaded by {UPLOADED_BY} to issue {ISSUE_TITLE}. </p><p>You can view the bug using the link below.</p>--------------------------<br><big><b><a href="{BUG_URL}">View Bug</a></b></big><br>Regards<br>The {SITE_NAME} Team'),
(10, 'bug_reported', '<p>Hi there,<p><p>A new bug ({ISSUE_TITLE}) has been reported by {ADDED_BY}. </p><p>You can view the Bug using the Dashboard Page.</p>--------------------------<br><big><b><a href="{BUG_URL}">View Bug</a></b></big><br>Regards<br>The {SITE_NAME} Team'),
(11, 'project_file', '<p>Hi there,</p><p>A new file has been uploaded by {UPLOADED_BY} to project {PROJECT_TITLE}. </p><p>You can view the Project using the link below.</p>--------------------------<br><big><b><a href="{PROJECT_URL}">View Project</a></b></big><br><br>Regards<br>The {SITE_NAME} Team'),
(12, 'project_complete', '<p>Hi {CLIENT_NAME}</p>\r\n\r\n<p>Project : {PROJECT_TITLE} - {PROJECT_CODE} has been completed. </p>\r\n\r\n<p>You can view the project by logging into your portal Account.</p>\r\n<big><b><a href="{PROJECT_URL}">View Project</a></b></big><br><br>\r\n--------------------------<br>\r\nProject Overview:<br>\r\nHours Logged # :  {PROJECT_HOURS} hours<br>\r\nProject Cost : {PROJECT_COST}<br>\r\nRegards<br>\r\nThe {SITE_NAME} Team'),
(13, 'project_comment', '<p>Hi there,</p><p>A new comment has been posted by {POSTED_BY} to project {PROJECT_TITLE}. </p><p>You can view the comment using the link below.</p>-----------------------------------------------------------------------<br><big><b><a href="{COMMENT_URL}">View Comment</a></b></big><br><br>Regards<br>The {SITE_NAME} Team'),
(14, 'task_assigned', '<p>Hi there,</p>\r\n<p>A new task ( {TASK_NAME} ) has been assigned to you by {ASSIGNED_BY} in project {PROJECT_TITLE}. </p>\r\n<p>You can view this task by logging in to the portal using the link below.</p>\r\n-----------------------------------<br>\r\n<big><b><a href="{PROJECT_URL}">View Task</a></b></big><br><br>\r\nRegards<br>\r\nThe {SITE_NAME} Team'),
(15, 'project_assigned', '<p>Hi there,</p><p>A new project ( {PROJECT_TITLE} ) has been assigned to you by {ASSIGNED_BY}.</p><p>You can view this project by logging in to the portal using the link below.</p>-----------------------------------<br><big><b><a href="{PROJECT_URL}">View Project</a></b></big><br><br>Regards<br>The {SITE_NAME} Team'),
(16, 'payment_email', '<p>Dear Customer</p>\r\n<p>We have received your payment of {INVOICE_CURRENCY} {PAID_AMOUNT}. </p>\r\n<p>Thank you for your Payment and business. We look forward to working with you again.</p>\r\n--------------------------<br>\r\nRegards<br>\r\nThe {SITE_NAME} Team'),
(17, 'invoice_message', '<p>Hello {CLIENT}<br></p><p>Here is the invoice of {CURRENCY} {AMOUNT}<br>You can view the invoice online at:<br><big><b><a href="{INVOICE_LINK}">View Invoice</a></b></big><br><br>Best Regards,<br>The {SITE_NAME} Team</p>'),
(18, 'invoice_reminder', '<p>Hello {CLIENT}</p><br><p>This is a friendly reminder to pay your invoice of {CURRENCY} {AMOUNT}<br>You can view the invoice online at:<br><big><b><a href="{INVOICE_LINK}">View Invoice</a></b></big><br><br>Best Regards,<br>The {SITE_NAME} Team</p>'),
(19, 'message_received', '<p>Hi {RECIPIENT},</p><p>You have received a message from {SENDER}. </p>------------------------------------------------------------------<br><blockquote>{MESSAGE}</blockquote><big><b><a href="{SITE_URL}">Go to Account</a></b></big><br><br>Regards<br>The {SITE_NAME} Team'),
(20, 'estimate_email', '        <p>Hi {CLIENT}</p>\r\n<p>Thanks for your business inquiry. </p>\r\nThe estimate {ESTIMATE_REF} is attached with this email. <br> \r\nEstimate Overview:<br> \r\nEstimate # : {ESTIMATE_REF}<br> \r\nAmount: {CURRENCY} {AMOUNT}<br> <br>\r\n\r\nYou can view the estimate online at:<br> \r\n<big><b><a href="{ESTIMATE_LINK}">View Estimate</a></b></big><br><br>  \r\nBest Regards,<br> \r\nThe {SITE_NAME} Team'),
(21, 'ticket_staff_email', '        <h3>Ticket Created</h3>\r\n\r\n<p>Ticket #{TICKET_CODE} has been created by the client.</p>\r\n\r\n<p>You may view the ticket by clicking on the following link <br><br>  Client Email : {REPORTER_EMAIL}<br><br> \r\n<big><b><a href="{TICKET_LINK}">View Ticket</a></b></big> <br><br>\r\n\r\nRegards<br><br>\r\n{SITE_NAME}</p>'),
(22, 'ticket_client_email', '<p>Hello {CLIENT_EMAIL},<br><br></p><p>Your ticket has been opened with us.<br><br>Ticket #{TICKET_CODE}<br>Status : Open<br><br>Click on the below link to see the ticket details and post additional comments.<br><br><big><b><a href="{TICKET_LINK}">View Ticket</a></b></big><br><br>Regards<br><br>{SITE_NAME} Team<br></p>'),
(23, 'ticket_reply_email', '<p>Hi,<br></p><p>A new response has been added to Ticket #{TICKET_CODE}<br><br> Ticket : #{TICKET_CODE} <br>Status : {TICKET_STATUS} <br><br></p>To see the response and post additional comments, click on the link below.<br><br>         <big><b><a href="{TICKET_LINK}">View Reply</a> </b></big><br><br>          Note: Do not reply to this email as this email is not monitored.<br><br>     Regards<br>{SITE_NAME} Team<br>'),
(24, 'ticket_closed_email', 'Hi {REPORTER_EMAIL}<br><br>Ticket #{TICKET_CODE} has been closed by {STAFF_USERNAME} <br><br>          Ticket : #{TICKET_CODE} <br>     \r\nStatus : {TICKET_STATUS}<br><br>\r\nReplies : {NO_OF_REPLIES}<br><br>          \r\nTo see the responses or open the ticket, click on the link below.<br><br>          <big><b><a href="{TICKET_LINK}">View Ticket</a></b></big> <br><br>          Note: Do not reply to this email as this email is not monitored.<br><br>    \r\nRegards<br>\r\n{SITE_NAME} Team');

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

--
-- Table structure for table `fx_estimates`
--

CREATE TABLE IF NOT EXISTS `fx_estimates` (
`est_id` int(11) NOT NULL,
  `reference_no` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `client` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `due_date` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
  `currency` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `discount` float NOT NULL,
  `notes` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Looking forward for your business.',
  `tax` int(11) NOT NULL DEFAULT '0',
  `status` enum('Accepted','Declined','Pending') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Pending',
  `date_sent` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `est_deleted` enum('Yes','No') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'No',
  `date_saved` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `emailed` enum('Yes','No') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'No',
  `invoiced` enum('Yes','No') COLLATE utf8_unicode_ci DEFAULT 'No'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

--
-- Truncate table before insert `fx_estimates`
--

TRUNCATE TABLE `fx_estimates`;
-- --------------------------------------------------------

--
-- Table structure for table `fx_estimate_items`
--

CREATE TABLE IF NOT EXISTS `fx_estimate_items` (
`item_id` int(11) NOT NULL,
  `estimate_id` int(11) NOT NULL,
  `item_name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `item_desc` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
  `unit_cost` float NOT NULL,
  `quantity` int(11) NOT NULL,
  `total_cost` float NOT NULL,
  `date_saved` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

--
-- Truncate table before insert `fx_estimate_items`
--

TRUNCATE TABLE `fx_estimate_items`;
-- --------------------------------------------------------

--
-- Table structure for table `fx_fields`
--

CREATE TABLE IF NOT EXISTS `fx_fields` (
`id` int(10) NOT NULL,
  `deptid` int(10) NOT NULL,
  `name` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL,
  `uniqid` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL,
  `type` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

--
-- Truncate table before insert `fx_fields`
--

TRUNCATE TABLE `fx_fields`;
-- --------------------------------------------------------

--
-- Table structure for table `fx_files`
--

CREATE TABLE IF NOT EXISTS `fx_files` (
`file_id` int(11) NOT NULL,
  `project` int(11) NOT NULL,
  `file_name` text COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `uploaded_by` int(11) NOT NULL,
  `date_posted` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

--
-- Truncate table before insert `fx_files`
--

TRUNCATE TABLE `fx_files`;
-- --------------------------------------------------------

--
-- Table structure for table `fx_invoices`
--

CREATE TABLE IF NOT EXISTS `fx_invoices` (
`inv_id` int(11) NOT NULL,
  `reference_no` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `client` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `due_date` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
  `notes` text COLLATE utf8_unicode_ci NOT NULL,
  `allow_paypal` enum('Yes','No') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Yes',
  `tax` float NOT NULL DEFAULT '0',
  `discount` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `recurring` enum('Yes','No') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'No',
  `r_freq` int(11) NOT NULL DEFAULT '31',
  `recur_start_date` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `recur_end_date` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `recur_frequency` varchar(12) COLLATE utf8_unicode_ci NOT NULL,
  `recur_next_date` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `currency` varchar(32) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'USD',
  `status` enum('Unpaid','Paid') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Unpaid',
  `archived` int(11) NOT NULL DEFAULT '0',
  `date_sent` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `inv_deleted` enum('Yes','No') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'No',
  `date_saved` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `emailed` enum('Yes','No') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'No',
  `show_client` enum('Yes','No') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Yes',
  `viewed` enum('Yes','No') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'No'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

--
-- Truncate table before insert `fx_invoices`
--

TRUNCATE TABLE `fx_invoices`;
-- --------------------------------------------------------

--
-- Table structure for table `fx_ipn_log`
--

CREATE TABLE IF NOT EXISTS `fx_ipn_log` (
`id` int(11) NOT NULL,
  `listener_name` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Either IPN or API',
  `transaction_type` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'The type of call being made to the listener',
  `transaction_id` varchar(19) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'The unique transaction ID generated by PayPal',
  `status` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'The status of the call',
  `message` varchar(512) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Explanation of the call status',
  `ipn_data_hash` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'MD5 hash of the IPN post data',
  `detail` mediumtext COLLATE utf8_unicode_ci COMMENT 'Detail text (potentially JSON) on this call',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

--
-- Truncate table before insert `fx_ipn_log`
--

TRUNCATE TABLE `fx_ipn_log`;
-- --------------------------------------------------------

--
-- Table structure for table `fx_ipn_orders`
--

CREATE TABLE IF NOT EXISTS `fx_ipn_orders` (
`id` int(11) NOT NULL,
  `notify_version` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'IPN Version Number',
  `verify_sign` varchar(127) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Encrypted string used to verify the authenticityof the tansaction',
  `test_ipn` int(11) DEFAULT NULL,
  `protection_eligibility` varchar(24) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Which type of seller protection the buyer is protected by',
  `charset` varchar(127) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Character set used by PayPal',
  `btn_id` varchar(40) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'The PayPal buy button clicked',
  `address_city` varchar(40) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'City of customers address',
  `address_country` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Country of customers address',
  `address_country_code` varchar(2) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Two character ISO 3166 country code',
  `address_name` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Name used with address (included when customer provides a Gift address)',
  `address_state` varchar(40) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'State of customer address',
  `address_status` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'confirmed/unconfirmed',
  `address_street` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Customer''s street address',
  `address_zip` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Zip code of customer''s address',
  `first_name` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Customer''s first name',
  `last_name` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Customer''s last name',
  `payer_business_name` varchar(127) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Customer''s company name, if customer represents a business',
  `payer_email` varchar(127) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Customer''s primary email address. Use this email to provide any credits',
  `payer_id` varchar(13) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Unique customer ID.',
  `payer_status` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'verified/unverified',
  `contact_phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Customer''s telephone number.',
  `residence_country` varchar(2) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Two-Character ISO 3166 country code',
  `business` varchar(127) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Email address or account ID of the payment recipient (that is, the merchant). Equivalent to the values of receiver_email (If payment is sent to primary account) and business set in the Website Payment HTML.',
  `receiver_email` varchar(127) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Primary email address of the payment recipient (that is, the merchant). If the payment is sent to a non-primary email address on your PayPal account, the receiver_email is still your primary email.',
  `receiver_id` varchar(13) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Unique account ID of the payment recipient (i.e., the merchant). This is the same as the recipients referral ID.',
  `custom` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Custom value as passed by you, the merchant. These are pass-through variables that are never presented to your customer.',
  `invoice` varchar(127) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Pass through variable you can use to identify your invoice number for this purchase. If omitted, no variable is passed back.',
  `memo` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Memo as entered by your customer in PayPal Website Payments note field.',
  `tax` decimal(10,2) DEFAULT NULL COMMENT 'Amount of tax charged on payment',
  `auth_id` varchar(19) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Authorization identification number',
  `auth_exp` varchar(28) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Authorization expiration date and time, in the following format: HH:MM:SS DD Mmm YY, YYYY PST',
  `auth_amount` int(11) DEFAULT NULL COMMENT 'Authorization amount',
  `auth_status` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Status of authorization',
  `num_cart_items` int(11) DEFAULT NULL COMMENT 'If this is a PayPal shopping cart transaction, number of items in the cart',
  `parent_txn_id` varchar(19) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'In the case of a refund, reversal, or cancelled reversal, this variable contains the txn_id of the original transaction, while txn_id contains a new ID for the new transaction.',
  `payment_date` varchar(28) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Time/date stamp generated by PayPal, in the following format: HH:MM:SS DD Mmm YY, YYYY PST',
  `payment_status` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Payment status of the payment',
  `payment_type` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'echeck/instant',
  `pending_reason` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'This variable is only set if payment_status=pending',
  `reason_code` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'This variable is only set if payment_status=reversed',
  `remaining_settle` int(11) DEFAULT NULL COMMENT 'Remaining amount that can be captured with Authorization and Capture',
  `shipping_method` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'The name of a shipping method from the shipping calculations section of the merchants account profile. The buyer selected the named shipping method for this transaction',
  `shipping` decimal(10,2) DEFAULT NULL COMMENT 'Shipping charges associated with this transaction. Format unsigned, no currency symbol, two decimal places',
  `transaction_entity` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Authorization and capture transaction entity',
  `txn_id` varchar(19) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'A unique transaction ID generated by PayPal',
  `txn_type` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'cart/express_checkout/send-money/virtual-terminal/web-accept',
  `exchange_rate` decimal(10,2) DEFAULT NULL COMMENT 'Exchange rate used if a currency conversion occured',
  `mc_currency` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Three character country code. For payment IPN notifications, this is the currency of the payment, for non-payment subscription IPN notifications, this is the currency of the subscription.',
  `mc_fee` decimal(10,2) DEFAULT NULL COMMENT 'Transaction fee associated with the payment, mc_gross minus mc_fee equals the amount deposited into the receiver_email account. Equivalent to payment_fee for USD payments. If this amount is negative, it signifies a refund or reversal, and either ofthose p',
  `mc_gross` decimal(10,2) DEFAULT NULL COMMENT 'Full amount of the customer''s payment',
  `mc_handling` decimal(10,2) DEFAULT NULL COMMENT 'Total handling charge associated with the transaction',
  `mc_shipping` decimal(10,2) DEFAULT NULL COMMENT 'Total shipping amount associated with the transaction',
  `payment_fee` decimal(10,2) DEFAULT NULL COMMENT 'USD transaction fee associated with the payment',
  `payment_gross` decimal(10,2) DEFAULT NULL COMMENT 'Full USD amount of the customers payment transaction, before payment_fee is subtracted',
  `settle_amount` decimal(10,2) DEFAULT NULL COMMENT 'Amount that is deposited into the account''s primary balance after a currency conversion',
  `settle_currency` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Currency of settle amount. Three digit currency code',
  `auction_buyer_id` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'The customer''s auction ID.',
  `auction_closing_date` varchar(28) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'The auction''s close date. In the format: HH:MM:SS DD Mmm YY, YYYY PSD',
  `auction_multi_item` int(11) DEFAULT NULL COMMENT 'The number of items purchased in multi-item auction payments',
  `for_auction` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'This is an auction payment - payments made using Pay for eBay Items or Smart Logos - as well as send money/money request payments with the type eBay items or Auction Goods(non-eBay)',
  `subscr_date` varchar(28) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Start date or cancellation date depending on whether txn_type is subcr_signup or subscr_cancel',
  `subscr_effective` varchar(28) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Date when a subscription modification becomes effective',
  `period1` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '(Optional) Trial subscription interval in days, weeks, months, years (example a 4 day interval is 4 D',
  `period2` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '(Optional) Trial period',
  `period3` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Regular subscription interval in days, weeks, months, years',
  `amount1` decimal(10,2) DEFAULT NULL COMMENT 'Amount of payment for Trial period 1 for USD',
  `amount2` decimal(10,2) DEFAULT NULL COMMENT 'Amount of payment for Trial period 2 for USD',
  `amount3` decimal(10,2) DEFAULT NULL COMMENT 'Amount of payment for regular subscription  period 1 for USD',
  `mc_amount1` decimal(10,2) DEFAULT NULL COMMENT 'Amount of payment for trial period 1 regardless of currency',
  `mc_amount2` decimal(10,2) DEFAULT NULL COMMENT 'Amount of payment for trial period 2 regardless of currency',
  `mc_amount3` decimal(10,2) DEFAULT NULL COMMENT 'Amount of payment for regular subscription period regardless of currency',
  `recurring` varchar(1) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Indicates whether rate recurs (1 is yes, blank is no)',
  `reattempt` varchar(1) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Indicates whether reattempts should occur on payment failure (1 is yes, blank is no)',
  `retry_at` varchar(28) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Date PayPal will retry a failed subscription payment',
  `recur_times` int(11) DEFAULT NULL COMMENT 'The number of payment installations that will occur at the regular rate',
  `username` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '(Optional) Username generated by PayPal and given to subscriber to access the subscription',
  `password` varchar(24) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '(Optional) Password generated by PayPal and given to subscriber to access the subscription (Encrypted)',
  `subscr_id` varchar(19) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'ID generated by PayPal for the subscriber',
  `case_id` varchar(28) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Case identification number',
  `case_type` varchar(28) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'complaint/chargeback',
  `case_creation_date` varchar(28) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Date/Time the case was registered',
  `order_status` enum('PAID','WAITING','REJECTED') COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Additional variable to make payment_status more actionable',
  `discount` decimal(10,2) DEFAULT NULL COMMENT 'Additional variable to record the discount made on the order',
  `shipping_discount` decimal(10,2) DEFAULT NULL COMMENT 'Record the discount made on the shipping',
  `ipn_track_id` varchar(127) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Internal tracking variable added in April 2011',
  `transaction_subject` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Describes the product for a button-based purchase',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

--
-- Truncate table before insert `fx_ipn_orders`
--

TRUNCATE TABLE `fx_ipn_orders`;
-- --------------------------------------------------------

--
-- Table structure for table `fx_ipn_order_items`
--

CREATE TABLE IF NOT EXISTS `fx_ipn_order_items` (
`id` int(11) NOT NULL,
  `order_id` int(11) DEFAULT NULL,
  `item_name` varchar(127) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Item name as passed by you, the merchant. Or, if not passed by you, as entered by your customer. If this is a shopping cart transaction, Paypal will append the number of the item (e.g., item_name_1,item_name_2, and so forth).',
  `item_number` varchar(127) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Pass-through variable for you to track purchases. It will get passed back to you at the completion of the payment. If omitted, no variable will be passed back to you.',
  `quantity` varchar(127) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Quantity as entered by your customer or as passed by you, the merchant. If this is a shopping cart transaction, PayPal appends the number of the item (e.g., quantity1,quantity2).',
  `mc_gross` decimal(10,2) DEFAULT NULL COMMENT 'Full amount of the customer''s payment',
  `mc_handling` decimal(10,2) DEFAULT NULL COMMENT 'Total handling charge associated with the transaction',
  `mc_shipping` decimal(10,2) DEFAULT NULL COMMENT 'Total shipping amount associated with the transaction',
  `tax` decimal(10,2) DEFAULT NULL COMMENT 'Amount of tax charged on payment',
  `cost_per_item` decimal(10,2) DEFAULT NULL COMMENT 'Cost of an individual item',
  `option_name_1` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Option 1 name as requested by you',
  `option_selection_1` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Option 1 choice as entered by your customer',
  `option_name_2` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Option 2 name as requested by you',
  `option_selection_2` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Option 2 choice as entered by your customer',
  `option_name_3` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Option 3 name as requested by you',
  `option_selection_3` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Option 3 choice as entered by your customer',
  `option_name_4` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Option 4 name as requested by you',
  `option_selection_4` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Option 4 choice as entered by your customer',
  `option_name_5` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Option 5 name as requested by you',
  `option_selection_5` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Option 5 choice as entered by your customer',
  `option_name_6` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Option 6 name as requested by you',
  `option_selection_6` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Option 6 choice as entered by your customer',
  `option_name_7` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Option 7 name as requested by you',
  `option_selection_7` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Option 7 choice as entered by your customer',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

--
-- Truncate table before insert `fx_ipn_order_items`
--

TRUNCATE TABLE `fx_ipn_order_items`;
-- --------------------------------------------------------

--
-- Table structure for table `fx_items`
--

CREATE TABLE IF NOT EXISTS `fx_items` (
`item_id` int(11) NOT NULL,
  `invoice_id` int(11) NOT NULL,
  `item_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `item_desc` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `unit_cost` float NOT NULL,
  `quantity` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `total_cost` float NOT NULL,
  `date_saved` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

--
-- Truncate table before insert `fx_items`
--

TRUNCATE TABLE `fx_items`;
-- --------------------------------------------------------

--
-- Table structure for table `fx_items_saved`
--

CREATE TABLE IF NOT EXISTS `fx_items_saved` (
`item_id` int(11) NOT NULL,
  `item_name` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
  `item_desc` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
  `unit_cost` int(11) NOT NULL,
  `deleted` enum('Yes','No') COLLATE utf8_unicode_ci DEFAULT 'No'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

--
-- Truncate table before insert `fx_items_saved`
--

TRUNCATE TABLE `fx_items_saved`;
-- --------------------------------------------------------

--
-- Table structure for table `fx_login_attempts`
--

CREATE TABLE IF NOT EXISTS `fx_login_attempts` (
`id` int(11) NOT NULL,
  `ip_address` varchar(40) NOT NULL,
  `login` varchar(50) NOT NULL,
  `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

--
-- Truncate table before insert `fx_login_attempts`
--

TRUNCATE TABLE `fx_login_attempts`;
-- --------------------------------------------------------

--
-- Table structure for table `fx_messages`
--

CREATE TABLE IF NOT EXISTS `fx_messages` (
`msg_id` int(11) NOT NULL,
  `user_to` int(11) NOT NULL,
  `user_from` int(11) NOT NULL,
  `message` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `status` enum('Read','Unread') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Unread',
  `attached_file` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `date_received` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `deleted` enum('Yes','No') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'No'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

--
-- Truncate table before insert `fx_messages`
--

TRUNCATE TABLE `fx_messages`;
-- --------------------------------------------------------

--
-- Table structure for table `fx_milestones`
--

CREATE TABLE IF NOT EXISTS `fx_milestones` (
`id` int(11) NOT NULL,
  `milestone_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `project` int(11) NOT NULL,
  `start_date` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `due_date` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

--
-- Truncate table before insert `fx_milestones`
--

TRUNCATE TABLE `fx_milestones`;
-- --------------------------------------------------------

--
-- Table structure for table `fx_payments`
--

CREATE TABLE IF NOT EXISTS `fx_payments` (
`p_id` int(11) NOT NULL,
  `invoice` int(11) NOT NULL,
  `paid_by` int(11) NOT NULL,
  `payer_email` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `payment_method` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `amount` float NOT NULL,
  `trans_id` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `notes` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `payment_date` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `created_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `month_paid` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `year_paid` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `inv_deleted` enum('Yes','No') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'No'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

--
-- Truncate table before insert `fx_payments`
--

TRUNCATE TABLE `fx_payments`;
-- --------------------------------------------------------

--
-- Table structure for table `fx_payment_methods`
--

CREATE TABLE IF NOT EXISTS `fx_payment_methods` (
`method_id` int(11) NOT NULL,
  `method_name` varchar(64) NOT NULL DEFAULT 'Paypal'
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;

--
-- Truncate table before insert `fx_payment_methods`
--

TRUNCATE TABLE `fx_payment_methods`;
--
-- Dumping data for table `fx_payment_methods`
--

INSERT INTO `fx_payment_methods` (`method_id`, `method_name`) VALUES
(1, 'Online'),
(2, 'Cash'),
(3, 'Bank Deposit'),
(5, 'Cheque');

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

--
-- Table structure for table `fx_permissions`
--

CREATE TABLE IF NOT EXISTS `fx_permissions` (
`permission_id` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `status` enum('active','inactive','deleted') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'active'
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=27 ;

--
-- Truncate table before insert `fx_permissions`
--

TRUNCATE TABLE `fx_permissions`;
--
-- Dumping data for table `fx_permissions`
--

INSERT INTO `fx_permissions` (`permission_id`, `name`, `description`, `status`) VALUES
(1, 'view_all_invoices', 'Allow user access to view all invoices', 'active'),
(2, 'edit_all_invoices', 'Allow user access to edit all invoices', 'active'),
(3, 'add_invoices', 'Allow user access to add invoices', 'active'),
(4, 'delete_invoices', 'Allow user access to delete invoice', 'active'),
(5, 'pay_invoice_offline', 'Allow user access to make offline Invoice Payments', 'active'),
(6, 'view_payments', 'Allow user access to view own payments', 'active'),
(7, 'email_invoices', 'Allow user access to email invoices', 'active'),
(8, 'send_email_reminders', 'Allow user access to send invoice reminders', 'active'),
(9, 'add_estimates', 'Allow user access to add estimates', 'active'),
(10, 'edit_estimates', 'Allow user access to edit all estimates', 'active'),
(11, 'view_all_estimates', 'Allow user access to view all estimates', 'active'),
(12, 'delete_estimates', 'Allow user access to delete estimates', 'active'),
(17, 'view_all_projects', 'Allow user access to view all projects', 'active'),
(18, 'view_project_cost', 'Allow user access to view project cost', 'active'),
(19, 'add_projects', 'Allow user access to add projects', 'active'),
(20, 'edit_all_projects', 'Allow user access to edit projects', 'active'),
(21, 'view_all_projects', 'Allow user access to view all projects', 'active'),
(22, 'delete_projects', 'Allow user access to delete projects', 'active'),
(23, 'edit_settings', 'Allow user access to edit all settings', 'active'),
(25, 'view_project_clients', 'Allow staff to view project''s clients', 'active'),
(26, 'view_project_notes', 'Allow staff to view project notes', 'active');

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

--
-- Table structure for table `fx_priorities`
--

CREATE TABLE IF NOT EXISTS `fx_priorities` (
  `priority` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Truncate table before insert `fx_priorities`
--

TRUNCATE TABLE `fx_priorities`;
--
-- Dumping data for table `fx_priorities`
--

INSERT INTO `fx_priorities` (`priority`) VALUES
('Low'),
('Medium'),
('High');

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

--
-- Table structure for table `fx_projects`
--

CREATE TABLE IF NOT EXISTS `fx_projects` (
`project_id` int(11) NOT NULL,
  `project_code` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `project_title` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Project Title',
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `client` int(11) NOT NULL,
  `start_date` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `due_date` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
  `fixed_rate` enum('Yes','No') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'No',
  `hourly_rate` float NOT NULL,
  `fixed_price` float NOT NULL,
  `progress` int(11) NOT NULL,
  `notes` text COLLATE utf8_unicode_ci NOT NULL,
  `assign_to` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `status` enum('On Hold','Active','Done') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Active',
  `timer` enum('On','Off') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Off',
  `timer_started_by` int(11) NOT NULL,
  `timer_start` int(11) NOT NULL,
  `time_logged` int(11) NOT NULL,
  `proj_deleted` enum('Yes','No') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'No',
  `auto_progress` enum('TRUE','FALSE') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'FALSE',
  `estimate_hours` int(11) NOT NULL,
  `settings` text COLLATE utf8_unicode_ci NOT NULL,
  `date_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

--
-- Truncate table before insert `fx_projects`
--

TRUNCATE TABLE `fx_projects`;
-- --------------------------------------------------------

--
-- Table structure for table `fx_project_settings`
--

CREATE TABLE IF NOT EXISTS `fx_project_settings` (
`id` int(11) NOT NULL,
  `setting` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=12 ;

--
-- Truncate table before insert `fx_project_settings`
--

TRUNCATE TABLE `fx_project_settings`;
--
-- Dumping data for table `fx_project_settings`
--

INSERT INTO `fx_project_settings` (`id`, `setting`, `description`) VALUES
(1, 'show_team_members', 'Allow client to view team members'),
(2, 'show_milestones', 'Allow client to view project milestones'),
(5, 'show_project_tasks', 'Allow client to view project tasks'),
(6, 'show_project_files', 'Allow client to view project files'),
(7, 'show_timesheets', 'Allow clients to view project timesheets'),
(8, 'show_project_bugs', 'Allow client to view project bugs'),
(9, 'show_project_history', 'Allow client to view project history'),
(10, 'show_project_calendar', 'Allow clients to view project calendars'),
(11, 'show_project_comments', 'Allow clients to view project comments');

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

--
-- Table structure for table `fx_project_timer`
--

CREATE TABLE IF NOT EXISTS `fx_project_timer` (
`timer_id` int(11) NOT NULL,
  `project` int(11) NOT NULL,
  `user` int(11) NOT NULL,
  `start_time` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `end_time` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `date_timed` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

--
-- Truncate table before insert `fx_project_timer`
--

TRUNCATE TABLE `fx_project_timer`;
-- --------------------------------------------------------

--
-- Table structure for table `fx_roles`
--

CREATE TABLE IF NOT EXISTS `fx_roles` (
`r_id` int(11) NOT NULL,
  `role` varchar(64) NOT NULL,
  `default` int(11) NOT NULL,
  `permissions` varchar(255) NOT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;

--
-- Truncate table before insert `fx_roles`
--

TRUNCATE TABLE `fx_roles`;
--
-- Dumping data for table `fx_roles`
--

INSERT INTO `fx_roles` (`r_id`, `role`, `default`, `permissions`) VALUES
(1, 'admin', 1, '{"settings":"permissions","role":"admin","view_all_invoices":"on","edit_invoices":"on","pay_invoice_offline":"on","view_all_payments":"on","email_invoices":"on","send_email_reminders":"on"}'),
(2, 'client', 2, '{"settings":"permissions","role":"client"}'),
(3, 'staff', 3, '{"settings":"permissions","role":"staff","view_all_invoices":"on","edit_invoices":"on","add_invoices":"on","pay_invoice_offline":"on","send_email_reminders":"on"}');

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

--
-- Table structure for table `fx_saved_tasks`
--

CREATE TABLE IF NOT EXISTS `fx_saved_tasks` (
`template_id` int(11) NOT NULL,
  `task_name` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `task_desc` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `visible` enum('Yes','No') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Yes',
  `estimate_hours` float NOT NULL,
  `added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `saved_by` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

--
-- Truncate table before insert `fx_saved_tasks`
--

TRUNCATE TABLE `fx_saved_tasks`;
-- --------------------------------------------------------

--
-- Table structure for table `fx_status`
--

CREATE TABLE IF NOT EXISTS `fx_status` (
`id` int(11) NOT NULL,
  `status` varchar(200) NOT NULL
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;

--
-- Truncate table before insert `fx_status`
--

TRUNCATE TABLE `fx_status`;
--
-- Dumping data for table `fx_status`
--

INSERT INTO `fx_status` (`id`, `status`) VALUES
(1, 'answered'),
(2, 'closed'),
(3, 'open'),
(5, 'in progress');

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

--
-- Table structure for table `fx_tasks`
--

CREATE TABLE IF NOT EXISTS `fx_tasks` (
`t_id` int(11) NOT NULL,
  `task_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `project` int(11) NOT NULL,
  `milestone` int(11) NOT NULL,
  `assigned_to` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `visible` enum('Yes','No') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Yes',
  `task_progress` int(11) NOT NULL DEFAULT '0',
  `timer_status` enum('On','Off') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Off',
  `timer_started_by` int(11) NOT NULL,
  `start_time` int(11) NOT NULL,
  `estimated_hours` int(11) NOT NULL,
  `logged_time` int(11) NOT NULL DEFAULT '0',
  `auto_progress` enum('TRUE','FALSE') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'FALSE',
  `due_date` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `added_by` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

--
-- Truncate table before insert `fx_tasks`
--

TRUNCATE TABLE `fx_tasks`;
-- --------------------------------------------------------

--
-- Table structure for table `fx_tasks_timer`
--

CREATE TABLE IF NOT EXISTS `fx_tasks_timer` (
`timer_id` int(11) NOT NULL,
  `task` int(11) NOT NULL,
  `pro_id` int(11) NOT NULL,
  `start_time` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `end_time` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `user` int(11) NOT NULL,
  `date_timed` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

--
-- Truncate table before insert `fx_tasks_timer`
--

TRUNCATE TABLE `fx_tasks_timer`;
-- --------------------------------------------------------

--
-- Table structure for table `fx_task_files`
--

CREATE TABLE IF NOT EXISTS `fx_task_files` (
`file_id` int(11) NOT NULL,
  `task` int(11) DEFAULT NULL,
  `file_name` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `file_ext` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `original_name` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `file_status` enum('unconfirmed','confirmed','in_progress','done','verified') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'unconfirmed',
  `uploaded_by` int(11) NOT NULL,
  `date_posted` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

--
-- Truncate table before insert `fx_task_files`
--

TRUNCATE TABLE `fx_task_files`;
-- --------------------------------------------------------

--
-- Table structure for table `fx_ticketreplies`
--

CREATE TABLE IF NOT EXISTS `fx_ticketreplies` (
`id` int(10) NOT NULL,
  `ticketid` int(10) NOT NULL,
  `body` text COLLATE utf8_unicode_ci NOT NULL,
  `replier` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL,
  `replierid` int(10) DEFAULT NULL,
  `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

--
-- Truncate table before insert `fx_ticketreplies`
--

TRUNCATE TABLE `fx_ticketreplies`;
-- --------------------------------------------------------

--
-- Table structure for table `fx_tickets`
--

CREATE TABLE IF NOT EXISTS `fx_tickets` (
`id` int(10) NOT NULL,
  `ticket_code` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `subject` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
  `body` text COLLATE utf8_unicode_ci NOT NULL,
  `status` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL,
  `department` int(11) DEFAULT NULL,
  `reporter` int(10) NOT NULL,
  `priority` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `additional` text COLLATE utf8_unicode_ci,
  `attachment` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

--
-- Truncate table before insert `fx_tickets`
--

TRUNCATE TABLE `fx_tickets`;
-- --------------------------------------------------------

--
-- Table structure for table `fx_un_sessions`
--

CREATE TABLE IF NOT EXISTS `fx_un_sessions` (
  `session_id` varchar(40) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '0',
  `ip_address` varchar(16) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '0',
  `user_agent` varchar(150) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `last_activity` int(10) unsigned NOT NULL DEFAULT '0',
  `user_data` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Truncate table before insert `fx_un_sessions`
--

TRUNCATE TABLE `fx_un_sessions`;
--
-- Dumping data for table `fx_un_sessions`
--

INSERT INTO `fx_un_sessions` (`session_id`, `ip_address`, `user_agent`, `last_activity`, `user_data`) VALUES
('9c7dd032b23d9fa3119002ca0101cf3d', '::1', 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0', 1420987933, 'a:7:{s:9:"user_data";s:0:"";s:7:"user_id";s:1:"1";s:8:"username";s:5:"admin";s:7:"role_id";s:1:"1";s:6:"status";s:1:"1";s:14:"requested_page";s:31:"http://localhost/foapi/settings";s:13:"previous_page";s:31:"http://localhost/foapi/settings";}');

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

--
-- Table structure for table `fx_users`
--

CREATE TABLE IF NOT EXISTS `fx_users` (
`id` int(11) NOT NULL,
  `username` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `password` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `role_id` int(11) NOT NULL DEFAULT '2',
  `activated` tinyint(1) NOT NULL DEFAULT '1',
  `banned` tinyint(1) NOT NULL DEFAULT '0',
  `ban_reason` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `new_password_key` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `new_password_requested` datetime DEFAULT NULL,
  `new_email` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `new_email_key` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `last_ip` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
  `last_login` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;

--
-- Truncate table before insert `fx_users`
--

TRUNCATE TABLE `fx_users`;
--
-- Dumping data for table `fx_users`
--

INSERT INTO `fx_users` (`id`, `username`, `password`, `email`, `role_id`, `activated`, `banned`, `ban_reason`, `new_password_key`, `new_password_requested`, `new_email`, `new_email_key`, `last_ip`, `last_login`, `created`, `modified`) VALUES
(1, 'admin', '$P$BvDrR6YijsXXSqtSw7ck2y0YJ3Qlc81', 'wm@gitbench.com', 1, 1, 0, NULL, NULL, NULL, NULL, NULL, '::1', '2015-01-11 14:52:24', '2015-01-11 14:49:51', '2015-01-11 14:52:24');

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

--
-- Table structure for table `fx_user_autologin`
--

CREATE TABLE IF NOT EXISTS `fx_user_autologin` (
  `key_id` char(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `user_id` int(11) NOT NULL DEFAULT '0',
  `user_agent` varchar(150) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `last_ip` varchar(40) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `last_login` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Truncate table before insert `fx_user_autologin`
--

TRUNCATE TABLE `fx_user_autologin`;
--
-- Indexes for dumped tables
--

--
-- Indexes for table `fx_account_details`
--
ALTER TABLE `fx_account_details`
 ADD PRIMARY KEY (`id`);

--
-- Indexes for table `fx_activities`
--
ALTER TABLE `fx_activities`
 ADD PRIMARY KEY (`activity_id`);

--
-- Indexes for table `fx_api_keys`
--
ALTER TABLE `fx_api_keys`
 ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `user` (`user`);

--
-- Indexes for table `fx_api_logs`
--
ALTER TABLE `fx_api_logs`
 ADD PRIMARY KEY (`id`);

--
-- Indexes for table `fx_assign_projects`
--
ALTER TABLE `fx_assign_projects`
 ADD PRIMARY KEY (`a_id`);

--
-- Indexes for table `fx_assign_tasks`
--
ALTER TABLE `fx_assign_tasks`
 ADD PRIMARY KEY (`a_id`);

--
-- Indexes for table `fx_bugs`
--
ALTER TABLE `fx_bugs`
 ADD PRIMARY KEY (`bug_id`), ADD UNIQUE KEY `issue_ref` (`issue_ref`);

--
-- Indexes for table `fx_bug_comments`
--
ALTER TABLE `fx_bug_comments`
 ADD PRIMARY KEY (`c_id`);

--
-- Indexes for table `fx_bug_files`
--
ALTER TABLE `fx_bug_files`
 ADD PRIMARY KEY (`file_id`);

--
-- Indexes for table `fx_captcha`
--
ALTER TABLE `fx_captcha`
 ADD PRIMARY KEY (`captcha_id`), ADD KEY `word` (`word`);

--
-- Indexes for table `fx_comments`
--
ALTER TABLE `fx_comments`
 ADD PRIMARY KEY (`comment_id`);

--
-- Indexes for table `fx_comment_replies`
--
ALTER TABLE `fx_comment_replies`
 ADD PRIMARY KEY (`reply_id`);

--
-- Indexes for table `fx_companies`
--
ALTER TABLE `fx_companies`
 ADD PRIMARY KEY (`co_id`);

--
-- Indexes for table `fx_config`
--
ALTER TABLE `fx_config`
 ADD PRIMARY KEY (`config_key`);

--
-- Indexes for table `fx_countries`
--
ALTER TABLE `fx_countries`
 ADD PRIMARY KEY (`id`);

--
-- Indexes for table `fx_departments`
--
ALTER TABLE `fx_departments`
 ADD PRIMARY KEY (`deptid`);

--
-- Indexes for table `fx_email_templates`
--
ALTER TABLE `fx_email_templates`
 ADD PRIMARY KEY (`template_id`);

--
-- Indexes for table `fx_estimates`
--
ALTER TABLE `fx_estimates`
 ADD PRIMARY KEY (`est_id`), ADD UNIQUE KEY `reference_no` (`reference_no`);

--
-- Indexes for table `fx_estimate_items`
--
ALTER TABLE `fx_estimate_items`
 ADD PRIMARY KEY (`item_id`);

--
-- Indexes for table `fx_fields`
--
ALTER TABLE `fx_fields`
 ADD PRIMARY KEY (`id`);

--
-- Indexes for table `fx_files`
--
ALTER TABLE `fx_files`
 ADD PRIMARY KEY (`file_id`);

--
-- Indexes for table `fx_invoices`
--
ALTER TABLE `fx_invoices`
 ADD PRIMARY KEY (`inv_id`), ADD UNIQUE KEY `reference_no` (`reference_no`);

--
-- Indexes for table `fx_ipn_log`
--
ALTER TABLE `fx_ipn_log`
 ADD PRIMARY KEY (`id`);

--
-- Indexes for table `fx_ipn_orders`
--
ALTER TABLE `fx_ipn_orders`
 ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `UniqueTransactionID` (`txn_id`);

--
-- Indexes for table `fx_ipn_order_items`
--
ALTER TABLE `fx_ipn_order_items`
 ADD PRIMARY KEY (`id`), ADD KEY `order_id` (`order_id`);

--
-- Indexes for table `fx_items`
--
ALTER TABLE `fx_items`
 ADD PRIMARY KEY (`item_id`);

--
-- Indexes for table `fx_items_saved`
--
ALTER TABLE `fx_items_saved`
 ADD PRIMARY KEY (`item_id`);

--
-- Indexes for table `fx_login_attempts`
--
ALTER TABLE `fx_login_attempts`
 ADD PRIMARY KEY (`id`);

--
-- Indexes for table `fx_messages`
--
ALTER TABLE `fx_messages`
 ADD PRIMARY KEY (`msg_id`);

--
-- Indexes for table `fx_milestones`
--
ALTER TABLE `fx_milestones`
 ADD PRIMARY KEY (`id`);

--
-- Indexes for table `fx_payments`
--
ALTER TABLE `fx_payments`
 ADD PRIMARY KEY (`p_id`);

--
-- Indexes for table `fx_payment_methods`
--
ALTER TABLE `fx_payment_methods`
 ADD PRIMARY KEY (`method_id`);

--
-- Indexes for table `fx_permissions`
--
ALTER TABLE `fx_permissions`
 ADD PRIMARY KEY (`permission_id`);

--
-- Indexes for table `fx_projects`
--
ALTER TABLE `fx_projects`
 ADD PRIMARY KEY (`project_id`);

--
-- Indexes for table `fx_project_settings`
--
ALTER TABLE `fx_project_settings`
 ADD PRIMARY KEY (`id`);

--
-- Indexes for table `fx_project_timer`
--
ALTER TABLE `fx_project_timer`
 ADD PRIMARY KEY (`timer_id`);

--
-- Indexes for table `fx_roles`
--
ALTER TABLE `fx_roles`
 ADD PRIMARY KEY (`r_id`);

--
-- Indexes for table `fx_saved_tasks`
--
ALTER TABLE `fx_saved_tasks`
 ADD PRIMARY KEY (`template_id`);

--
-- Indexes for table `fx_status`
--
ALTER TABLE `fx_status`
 ADD PRIMARY KEY (`id`);

--
-- Indexes for table `fx_tasks`
--
ALTER TABLE `fx_tasks`
 ADD PRIMARY KEY (`t_id`);

--
-- Indexes for table `fx_tasks_timer`
--
ALTER TABLE `fx_tasks_timer`
 ADD PRIMARY KEY (`timer_id`);

--
-- Indexes for table `fx_task_files`
--
ALTER TABLE `fx_task_files`
 ADD PRIMARY KEY (`file_id`);

--
-- Indexes for table `fx_ticketreplies`
--
ALTER TABLE `fx_ticketreplies`
 ADD PRIMARY KEY (`id`);

--
-- Indexes for table `fx_tickets`
--
ALTER TABLE `fx_tickets`
 ADD PRIMARY KEY (`id`);

--
-- Indexes for table `fx_un_sessions`
--
ALTER TABLE `fx_un_sessions`
 ADD PRIMARY KEY (`session_id`);

--
-- Indexes for table `fx_users`
--
ALTER TABLE `fx_users`
 ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `username` (`username`);

--
-- Indexes for table `fx_user_autologin`
--
ALTER TABLE `fx_user_autologin`
 ADD PRIMARY KEY (`key_id`,`user_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `fx_account_details`
--
ALTER TABLE `fx_account_details`
MODIFY `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `fx_activities`
--
ALTER TABLE `fx_activities`
MODIFY `activity_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `fx_api_keys`
--
ALTER TABLE `fx_api_keys`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `fx_api_logs`
--
ALTER TABLE `fx_api_logs`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `fx_assign_projects`
--
ALTER TABLE `fx_assign_projects`
MODIFY `a_id` int(11) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `fx_assign_tasks`
--
ALTER TABLE `fx_assign_tasks`
MODIFY `a_id` int(11) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `fx_bugs`
--
ALTER TABLE `fx_bugs`
MODIFY `bug_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `fx_bug_comments`
--
ALTER TABLE `fx_bug_comments`
MODIFY `c_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `fx_bug_files`
--
ALTER TABLE `fx_bug_files`
MODIFY `file_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `fx_captcha`
--
ALTER TABLE `fx_captcha`
MODIFY `captcha_id` bigint(13) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `fx_comments`
--
ALTER TABLE `fx_comments`
MODIFY `comment_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `fx_comment_replies`
--
ALTER TABLE `fx_comment_replies`
MODIFY `reply_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `fx_companies`
--
ALTER TABLE `fx_companies`
MODIFY `co_id` int(11) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `fx_countries`
--
ALTER TABLE `fx_countries`
MODIFY `id` int(6) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=243;
--
-- AUTO_INCREMENT for table `fx_departments`
--
ALTER TABLE `fx_departments`
MODIFY `deptid` int(10) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `fx_email_templates`
--
ALTER TABLE `fx_email_templates`
MODIFY `template_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=25;
--
-- AUTO_INCREMENT for table `fx_estimates`
--
ALTER TABLE `fx_estimates`
MODIFY `est_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `fx_estimate_items`
--
ALTER TABLE `fx_estimate_items`
MODIFY `item_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `fx_fields`
--
ALTER TABLE `fx_fields`
MODIFY `id` int(10) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `fx_files`
--
ALTER TABLE `fx_files`
MODIFY `file_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `fx_invoices`
--
ALTER TABLE `fx_invoices`
MODIFY `inv_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `fx_ipn_log`
--
ALTER TABLE `fx_ipn_log`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `fx_ipn_orders`
--
ALTER TABLE `fx_ipn_orders`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `fx_ipn_order_items`
--
ALTER TABLE `fx_ipn_order_items`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `fx_items`
--
ALTER TABLE `fx_items`
MODIFY `item_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `fx_items_saved`
--
ALTER TABLE `fx_items_saved`
MODIFY `item_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `fx_login_attempts`
--
ALTER TABLE `fx_login_attempts`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `fx_messages`
--
ALTER TABLE `fx_messages`
MODIFY `msg_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `fx_milestones`
--
ALTER TABLE `fx_milestones`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `fx_payments`
--
ALTER TABLE `fx_payments`
MODIFY `p_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `fx_payment_methods`
--
ALTER TABLE `fx_payment_methods`
MODIFY `method_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `fx_permissions`
--
ALTER TABLE `fx_permissions`
MODIFY `permission_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=27;
--
-- AUTO_INCREMENT for table `fx_projects`
--
ALTER TABLE `fx_projects`
MODIFY `project_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `fx_project_settings`
--
ALTER TABLE `fx_project_settings`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=12;
--
-- AUTO_INCREMENT for table `fx_project_timer`
--
ALTER TABLE `fx_project_timer`
MODIFY `timer_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `fx_roles`
--
ALTER TABLE `fx_roles`
MODIFY `r_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `fx_saved_tasks`
--
ALTER TABLE `fx_saved_tasks`
MODIFY `template_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `fx_status`
--
ALTER TABLE `fx_status`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `fx_tasks`
--
ALTER TABLE `fx_tasks`
MODIFY `t_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `fx_tasks_timer`
--
ALTER TABLE `fx_tasks_timer`
MODIFY `timer_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `fx_task_files`
--
ALTER TABLE `fx_task_files`
MODIFY `file_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `fx_ticketreplies`
--
ALTER TABLE `fx_ticketreplies`
MODIFY `id` int(10) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `fx_tickets`
--
ALTER TABLE `fx_tickets`
MODIFY `id` int(10) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `fx_users`
--
ALTER TABLE `fx_users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
