From 5192e66a80046bd1aa12e42dd1b8bf3aa6dc6dbd Mon Sep 17 00:00:00 2001 From: Sujit Prasad Date: Wed, 20 Apr 2016 10:24:20 +0530 Subject: [PATCH] Database dump file updated to v1.0.7 --- DB/demodatabase.sql | 252 +++- .../Updatedatabase.sql | 1173 +++++++++++++++++ 2 files changed, 1362 insertions(+), 63 deletions(-) create mode 100644 DB/update from 1.0.6.10 to 1.0.7/Updatedatabase.sql diff --git a/DB/demodatabase.sql b/DB/demodatabase.sql index a7c106303..d2a9dfe4b 100644 --- a/DB/demodatabase.sql +++ b/DB/demodatabase.sql @@ -3,7 +3,7 @@ -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 --- Generation Time: Feb 18, 2016 at 08:11 PM +-- Generation Time: Apr 20, 2016 at 06:48 AM -- Server version: 5.6.17 -- PHP Version: 5.5.12 @@ -173,9 +173,9 @@ CREATE TABLE IF NOT EXISTS `department` ( -- INSERT INTO `department` (`id`, `name`, `type`, `sla`, `manager`, `ticket_assignment`, `outgoing_email`, `template_set`, `auto_ticket_response`, `auto_message_response`, `auto_response_email`, `recipient`, `group_access`, `department_sign`, `created_at`, `updated_at`) VALUES -(1, 'Support', '', 1, NULL, '', '', '', '', '', '', '', '', '', '2016-02-18 08:41:11', '2016-02-18 08:41:11'), -(2, 'Sales', '', 1, NULL, '', '', '', '', '', '', '', '', '', '2016-02-18 08:41:11', '2016-02-18 08:41:11'), -(3, 'Operation', '', 1, NULL, '', '', '', '', '', '', '', '', '', '2016-02-18 08:41:11', '2016-02-18 08:41:11'); +(1, 'Support', '', 1, NULL, '', '', '', '', '', '', '', '', '', '2016-04-19 22:39:55', '2016-04-19 22:39:55'), +(2, 'Sales', '', 1, NULL, '', '', '', '', '', '', '', '', '', '2016-04-19 22:39:55', '2016-04-19 22:39:55'), +(3, 'Operation', '', 1, NULL, '', '', '', '', '', '', '', '', '', '2016-04-19 22:39:55', '2016-04-19 22:39:55'); -- -------------------------------------------------------- @@ -194,11 +194,14 @@ CREATE TABLE IF NOT EXISTS `emails` ( `password` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `fetching_host` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `fetching_port` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `fetching_protocol` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `fetching_encryption` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `mailbox_protocol` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `imap_config` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `folder` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `sending_host` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `sending_port` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `sending_protocol` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `sending_encryption` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `internal_notes` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `auto_response` tinyint(1) NOT NULL, @@ -216,7 +219,7 @@ CREATE TABLE IF NOT EXISTS `emails` ( KEY `department_2` (`department`,`priority`,`help_topic`), KEY `priority` (`priority`), KEY `help_topic` (`help_topic`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- @@ -251,9 +254,9 @@ CREATE TABLE IF NOT EXISTS `groups` ( -- INSERT INTO `groups` (`id`, `name`, `group_status`, `can_create_ticket`, `can_edit_ticket`, `can_post_ticket`, `can_close_ticket`, `can_assign_ticket`, `can_transfer_ticket`, `can_delete_ticket`, `can_ban_email`, `can_manage_canned`, `can_manage_faq`, `can_view_agent_stats`, `department_access`, `admin_notes`, `created_at`, `updated_at`) VALUES -(1, 'Group A', 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, '', '2016-02-18 08:41:11', '2016-02-18 08:41:11'), -(2, 'Group B', 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, '', '2016-02-18 08:41:11', '2016-02-18 08:41:11'), -(3, 'Group C', 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, '', '2016-02-18 08:41:11', '2016-02-18 08:41:11'); +(1, 'Group A', 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, '', '2016-04-19 22:39:54', '2016-04-19 22:39:54'), +(2, 'Group B', 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, '', '2016-04-19 22:39:54', '2016-04-19 22:39:54'), +(3, 'Group C', 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, '', '2016-04-19 22:39:55', '2016-04-19 22:39:55'); -- -------------------------------------------------------- @@ -310,9 +313,9 @@ CREATE TABLE IF NOT EXISTS `help_topic` ( -- INSERT INTO `help_topic` (`id`, `topic`, `parent_topic`, `custom_form`, `department`, `ticket_status`, `priority`, `sla_plan`, `thank_page`, `ticket_num_format`, `internal_notes`, `status`, `type`, `auto_assign`, `auto_response`, `created_at`, `updated_at`) VALUES -(1, 'Support query', '', NULL, 1, 1, 2, 1, '', '1', '', 1, 1, NULL, 0, '2016-02-18 08:41:11', '2016-02-18 08:41:11'), -(2, 'Sales query', '', NULL, 2, 1, 2, 1, '', '1', '', 0, 1, NULL, 0, '2016-02-18 08:41:11', '2016-02-18 08:41:11'), -(3, 'Operational query', '', NULL, 3, 1, 2, 1, '', '1', '', 0, 1, NULL, 0, '2016-02-18 08:41:11', '2016-02-18 08:41:11'); +(1, 'Support query', '', NULL, 1, 1, 2, 1, '', '1', '', 1, 1, NULL, 0, '2016-04-19 22:39:55', '2016-04-19 22:39:55'), +(2, 'Sales query', '', NULL, 2, 1, 2, 1, '', '1', '', 0, 1, NULL, 0, '2016-04-19 22:39:55', '2016-04-19 22:39:55'), +(3, 'Operational query', '', NULL, 3, 1, 2, 1, '', '1', '', 0, 1, NULL, 0, '2016-04-19 22:39:55', '2016-04-19 22:39:55'); -- -------------------------------------------------------- @@ -425,7 +428,7 @@ CREATE TABLE IF NOT EXISTS `kb_settings` ( -- INSERT INTO `kb_settings` (`id`, `pagination`, `created_at`, `updated_at`) VALUES -(1, 10, '2016-02-18 08:41:12', '2016-02-18 08:41:12'); +(1, 10, '2016-04-19 22:39:56', '2016-04-19 22:39:56'); -- -------------------------------------------------------- @@ -474,7 +477,7 @@ CREATE TABLE IF NOT EXISTS `log_notification` ( -- INSERT INTO `log_notification` (`id`, `log`, `created_at`, `updated_at`) VALUES -(1, 'NOT-1', '2016-02-18 08:41:11', '2016-02-18 08:41:11'); +(1, 'NOT-1', '2016-04-19 22:39:55', '2016-04-19 22:39:55'); -- -------------------------------------------------------- @@ -581,7 +584,45 @@ INSERT INTO `migrations` (`migration`, `batch`) VALUES ('2016_02_16_140454_add_foreign_keys_to_ticket_thread_table', 1), ('2016_02_16_140454_add_foreign_keys_to_tickets_table', 1), ('2016_02_16_140454_add_foreign_keys_to_user_assign_organization_table', 1), -('2016_02_16_140454_add_foreign_keys_to_users_table', 1); +('2016_02_16_140454_add_foreign_keys_to_users_table', 1), +('2016_03_31_061239_create_notifications_table', 1), +('2016_03_31_061534_create_notification_types_table', 1), +('2016_03_31_061740_create_user_notification_table', 1), +('2016_04_18_115852_create_workflow_name_table', 1), +('2016_04_18_115900_create_workflow_rule_table', 1), +('2016_04_18_115908_create_workflow_action_table', 1); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `notifications` +-- + +CREATE TABLE IF NOT EXISTS `notifications` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `model_id` int(11) NOT NULL, + `userid_created` int(11) NOT NULL, + `type_id` int(11) NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `notification_types` +-- + +CREATE TABLE IF NOT EXISTS `notification_types` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `message` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `icon_class` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- @@ -705,7 +746,7 @@ CREATE TABLE IF NOT EXISTS `settings_alert_notice` ( -- INSERT INTO `settings_alert_notice` (`id`, `ticket_status`, `ticket_admin_email`, `ticket_department_manager`, `ticket_department_member`, `ticket_organization_accmanager`, `message_status`, `message_last_responder`, `message_assigned_agent`, `message_department_manager`, `message_organization_accmanager`, `internal_status`, `internal_last_responder`, `internal_assigned_agent`, `internal_department_manager`, `assignment_status`, `assignment_assigned_agent`, `assignment_team_leader`, `assignment_team_member`, `transfer_status`, `transfer_assigned_agent`, `transfer_department_manager`, `transfer_department_member`, `overdue_status`, `overdue_assigned_agent`, `overdue_department_manager`, `overdue_department_member`, `system_error`, `sql_error`, `excessive_failure`, `created_at`, `updated_at`) VALUES -(1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '2016-02-18 08:41:11', '2016-02-18 08:41:11'); +(1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '2016-04-19 22:39:55', '2016-04-19 22:39:55'); -- -------------------------------------------------------- @@ -730,7 +771,7 @@ CREATE TABLE IF NOT EXISTS `settings_auto_response` ( -- INSERT INTO `settings_auto_response` (`id`, `new_ticket`, `agent_new_ticket`, `submitter`, `participants`, `overlimit`, `created_at`, `updated_at`) VALUES -(1, 1, 1, 0, 0, 0, '2016-02-18 08:41:11', '2016-02-18 08:41:11'); +(1, 1, 1, 0, 0, 0, '2016-04-19 22:39:55', '2016-04-19 22:39:55'); -- -------------------------------------------------------- @@ -759,7 +800,7 @@ CREATE TABLE IF NOT EXISTS `settings_company` ( -- INSERT INTO `settings_company` (`id`, `company_name`, `website`, `phone`, `address`, `landing_page`, `offline_page`, `thank_page`, `logo`, `use_logo`, `created_at`, `updated_at`) VALUES -(1, '', '', '', '', '', '', '', '', '', '2016-02-18 08:41:11', '2016-02-18 08:41:11'); +(1, '', '', '', '', '', '', '', '', '', '2016-04-19 22:39:55', '2016-04-19 22:39:55'); -- -------------------------------------------------------- @@ -791,7 +832,7 @@ CREATE TABLE IF NOT EXISTS `settings_email` ( -- INSERT INTO `settings_email` (`id`, `template`, `sys_email`, `alert_email`, `admin_email`, `mta`, `email_fetching`, `notification_cron`, `strip`, `separator`, `all_emails`, `email_collaborator`, `attachment`, `created_at`, `updated_at`) VALUES -(1, 'default', NULL, '', '', '', 1, 0, 0, 0, 1, 1, 1, '2016-02-18 08:41:11', '2016-02-18 08:47:51'); +(1, 'default', NULL, '', '', '', 1, 0, 0, 0, 1, 1, 1, '2016-04-19 22:39:55', '2016-04-19 22:39:55'); -- -------------------------------------------------------- @@ -827,6 +868,7 @@ CREATE TABLE IF NOT EXISTS `settings_system` ( `log_level` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `purge_log` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `api_enable` int(11) NOT NULL, + `api_key_mandatory` int(11) NOT NULL, `api_key` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `name_format` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `time_farmat` int(10) unsigned DEFAULT NULL, @@ -848,8 +890,8 @@ CREATE TABLE IF NOT EXISTS `settings_system` ( -- Dumping data for table `settings_system` -- -INSERT INTO `settings_system` (`id`, `status`, `url`, `name`, `department`, `page_size`, `log_level`, `purge_log`, `api_enable`, `api_key`, `name_format`, `time_farmat`, `date_format`, `date_time_format`, `day_date_time`, `time_zone`, `content`, `created_at`, `updated_at`) VALUES -(1, 1, '', '', '1', '', '', '', 0, '', '', NULL, NULL, 1, '', 79, '', '2016-02-18 08:41:12', '2016-02-18 08:41:12'); +INSERT INTO `settings_system` (`id`, `status`, `url`, `name`, `department`, `page_size`, `log_level`, `purge_log`, `api_enable`, `api_key_mandatory`, `api_key`, `name_format`, `time_farmat`, `date_format`, `date_time_format`, `day_date_time`, `time_zone`, `content`, `created_at`, `updated_at`) VALUES +(1, 1, '', '', '1', '', '', '', 0, 0, '', '', NULL, NULL, 1, '', 79, '', '2016-04-19 22:39:56', '2016-04-19 22:39:56'); -- -------------------------------------------------------- @@ -885,7 +927,7 @@ CREATE TABLE IF NOT EXISTS `settings_ticket` ( -- INSERT INTO `settings_ticket` (`id`, `num_format`, `num_sequence`, `priority`, `sla`, `help_topic`, `max_open_ticket`, `collision_avoid`, `captcha`, `status`, `claim_response`, `assigned_ticket`, `answered_ticket`, `agent_mask`, `html`, `client_update`, `max_file_size`, `created_at`, `updated_at`) VALUES -(1, '#ABCD 1234 1234567', '0', '1', '2', '1', '', '2', '', 1, 0, 0, 0, 0, 0, 0, 0, '2016-02-18 08:41:11', '2016-02-18 08:41:11'); +(1, '#ABCD 1234 1234567', '0', '1', '2', '1', '', '2', '', 1, 0, 0, 0, 0, 0, 0, 0, '2016-04-19 22:39:55', '2016-04-19 22:39:55'); -- -------------------------------------------------------- @@ -911,9 +953,9 @@ CREATE TABLE IF NOT EXISTS `sla_plan` ( -- INSERT INTO `sla_plan` (`id`, `name`, `grace_period`, `admin_note`, `status`, `transient`, `ticket_overdue`, `created_at`, `updated_at`) VALUES -(1, 'Sla 1', '6 Hours', '', 1, 0, 0, '2016-02-18 08:41:10', '2016-02-18 08:41:10'), -(2, 'Sla 2', '12 Hours', '', 1, 0, 0, '2016-02-18 08:41:10', '2016-02-18 08:41:10'), -(3, 'Sla 3', '24 Hours', '', 1, 0, 0, '2016-02-18 08:41:10', '2016-02-18 08:41:10'); +(1, 'Sla 1', '6 Hours', '', 1, 0, 0, '2016-04-19 22:39:54', '2016-04-19 22:39:54'), +(2, 'Sla 2', '12 Hours', '', 1, 0, 0, '2016-04-19 22:39:54', '2016-04-19 22:39:54'), +(3, 'Sla 3', '24 Hours', '', 1, 0, 0, '2016-04-19 22:39:54', '2016-04-19 22:39:54'); -- -------------------------------------------------------- @@ -939,9 +981,9 @@ CREATE TABLE IF NOT EXISTS `teams` ( -- INSERT INTO `teams` (`id`, `name`, `status`, `team_lead`, `assign_alert`, `admin_notes`, `created_at`, `updated_at`) VALUES -(1, 'Level 1 Support', 1, NULL, 0, '', '2016-02-18 08:41:10', '2016-02-18 08:41:10'), -(2, 'Level 2 Support', 0, NULL, 0, '', '2016-02-18 08:41:10', '2016-02-18 08:41:10'), -(3, 'Developer', 0, NULL, 0, '', '2016-02-18 08:41:10', '2016-02-18 08:41:10'); +(1, 'Level 1 Support', 1, NULL, 0, '', '2016-04-19 22:39:54', '2016-04-19 22:39:54'), +(2, 'Level 2 Support', 0, NULL, 0, '', '2016-04-19 22:39:54', '2016-04-19 22:39:54'), +(3, 'Developer', 0, NULL, 0, '', '2016-04-19 22:39:54', '2016-04-19 22:39:54'); -- -------------------------------------------------------- @@ -1027,7 +1069,7 @@ CREATE TABLE IF NOT EXISTS `tickets` ( KEY `status` (`status`), KEY `assigned_to` (`assigned_to`), KEY `source` (`source`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=3 ; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- @@ -1044,10 +1086,10 @@ CREATE TABLE IF NOT EXISTS `ticket_attachment` ( `poster` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', - `file` blob, + `file` mediumblob, PRIMARY KEY (`id`), KEY `thread_id` (`thread_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=3 ; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- @@ -1106,10 +1148,10 @@ CREATE TABLE IF NOT EXISTS `ticket_priority` ( -- INSERT INTO `ticket_priority` (`priority_id`, `priority`, `priority_desc`, `priority_color`, `priority_urgency`, `ispublic`) VALUES -(1, 'low', 'Low', 'info', 4, 1), -(2, 'normal', 'Normal', 'info', 3, 1), -(3, 'high', 'High', 'warning', 2, 1), -(4, 'emergency', 'Emergency', 'danger', 1, 1); +(1, 'Low', 'Low', 'info', 4, 1), +(2, 'Normal', 'Normal', 'info', 3, 1), +(3, 'High', 'High', 'warning', 2, 1), +(4, 'Emergency', 'Emergency', 'danger', 1, 1); -- -------------------------------------------------------- @@ -1158,11 +1200,11 @@ CREATE TABLE IF NOT EXISTS `ticket_status` ( -- INSERT INTO `ticket_status` (`id`, `name`, `state`, `mode`, `message`, `flags`, `sort`, `properties`, `created_at`, `updated_at`) VALUES -(1, 'Open', 'open', 3, 'Ticket have been Reopened by', 0, 1, 'Open tickets.', '2016-02-18 08:41:09', '2016-02-18 08:41:09'), -(2, 'Resolved', 'closed', 1, 'Ticket have been Resolved by', 0, 2, 'Resolved tickets.', '2016-02-18 08:41:09', '2016-02-18 08:41:09'), -(3, 'Closed', 'closed', 3, 'Ticket have been Closed by', 0, 3, 'Closed tickets. Tickets will still be accessible on client and staff panels.', '2016-02-18 08:41:09', '2016-02-18 08:41:09'), -(4, 'Archived', 'archived', 3, 'Ticket have been Archived by', 0, 4, 'Tickets only adminstratively available but no longer accessible on ticket queues and client panel.', '2016-02-18 08:41:09', '2016-02-18 08:41:09'), -(5, 'Deleted', 'deleted', 3, 'Ticket have been Deleted by', 0, 5, 'Tickets queued for deletion. Not accessible on ticket queues.', '2016-02-18 08:41:09', '2016-02-18 08:41:09'); +(1, 'Open', 'open', 3, 'Ticket have been Reopened by', 0, 1, 'Open tickets.', '2016-04-19 22:39:53', '2016-04-19 22:39:53'), +(2, 'Resolved', 'closed', 1, 'Ticket have been Resolved by', 0, 2, 'Resolved tickets.', '2016-04-19 22:39:53', '2016-04-19 22:39:53'), +(3, 'Closed', 'closed', 3, 'Ticket have been Closed by', 0, 3, 'Closed tickets. Tickets will still be accessible on client and staff panels.', '2016-04-19 22:39:53', '2016-04-19 22:39:53'), +(4, 'Archived', 'archived', 3, 'Ticket have been Archived by', 0, 4, 'Tickets only adminstratively available but no longer accessible on ticket queues and client panel.', '2016-04-19 22:39:53', '2016-04-19 22:39:53'), +(5, 'Deleted', 'deleted', 3, 'Ticket have been Deleted by', 0, 5, 'Tickets queued for deletion. Not accessible on ticket queues.', '2016-04-19 22:39:53', '2016-04-19 22:39:53'); -- -------------------------------------------------------- @@ -1176,6 +1218,8 @@ CREATE TABLE IF NOT EXISTS `ticket_thread` ( `user_id` int(10) unsigned DEFAULT NULL, `poster` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `source` int(10) unsigned DEFAULT NULL, + `reply_rating` int(11) NOT NULL, + `rating_count` int(11) NOT NULL, `is_internal` tinyint(1) NOT NULL, `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `body` text COLLATE utf8_unicode_ci NOT NULL, @@ -1187,7 +1231,7 @@ CREATE TABLE IF NOT EXISTS `ticket_thread` ( KEY `ticket_id_2` (`ticket_id`), KEY `user_id` (`user_id`), KEY `source` (`source`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=8 ; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- @@ -1381,14 +1425,14 @@ CREATE TABLE IF NOT EXISTS `users` ( UNIQUE KEY `users_email_unique` (`email`), KEY `assign_group_3` (`assign_group`), KEY `primary_dpt_2` (`primary_dpt`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=3 ; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ; -- -- Dumping data for table `users` -- INSERT INTO `users` (`id`, `user_name`, `first_name`, `last_name`, `gender`, `email`, `ban`, `password`, `active`, `ext`, `phone_number`, `mobile`, `agent_sign`, `account_type`, `account_status`, `assign_group`, `primary_dpt`, `agent_tzone`, `daylight_save`, `limit_access`, `directory_listing`, `vacation_mode`, `company`, `role`, `internal_note`, `profile_pic`, `remember_token`, `created_at`, `updated_at`) VALUES -(1, 'demo.admin', 'demo', 'admin', 0, 'demo@admin.com', 0, '$2y$10$whmtHDap2LVeCcMy4gjYk.nOWKx45M7loy8TsVjWozLLfQbDRswUe', 1, '', '', '', '', '', '', 1, 1, '', '', '', '', '', '', 'admin', '', '', 'mzJmeXU43vOHGxFvFcnwQTAKa3HEqOjUu7quW9hPxR211S3uAJDZCGJ5PXXj', '2016-02-18 08:41:12', '2016-02-18 08:55:17'); +(1, 'demo@admin.com', 'admin', 'demo', 0, 'demo@admin.com', 0, '$2y$10$r1QfG5KRpX8h0nyf96xCTOCAYvKFYu4HQbZwQM5w000VX/Klyqiri', 1, '', '', '', '', '', '', 1, 1, '', '', '', '', '', '', 'admin', '', '', NULL, '2016-04-19 22:39:56', '2016-04-19 22:39:56'); -- -------------------------------------------------------- @@ -1409,6 +1453,22 @@ CREATE TABLE IF NOT EXISTS `user_assign_organization` ( -- -------------------------------------------------------- +-- +-- Table structure for table `user_notification` +-- + +CREATE TABLE IF NOT EXISTS `user_notification` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `notification_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + `is_read` int(11) NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + -- -- Table structure for table `version_check` -- @@ -1427,7 +1487,7 @@ CREATE TABLE IF NOT EXISTS `version_check` ( -- INSERT INTO `version_check` (`id`, `current_version`, `new_version`, `created_at`, `updated_at`) VALUES -(1, '', '', '2016-02-18 08:41:11', '2016-02-18 08:41:11'); +(1, '', '', '2016-04-19 22:39:55', '2016-04-19 22:39:55'); -- -------------------------------------------------------- @@ -1450,26 +1510,80 @@ CREATE TABLE IF NOT EXISTS `widgets` ( -- INSERT INTO `widgets` (`id`, `name`, `title`, `value`, `created_at`, `updated_at`) VALUES -(1, 'footer1', NULL, NULL, '2016-02-18 08:41:11', '2016-02-18 08:41:11'), -(2, 'footer2', NULL, NULL, '2016-02-18 08:41:11', '2016-02-18 08:41:11'), -(3, 'footer3', NULL, NULL, '2016-02-18 08:41:11', '2016-02-18 08:41:11'), -(4, 'footer4', NULL, NULL, '2016-02-18 08:41:11', '2016-02-18 08:41:11'), -(5, 'side1', NULL, NULL, '2016-02-18 08:41:12', '2016-02-18 08:41:12'), -(6, 'side2', NULL, NULL, '2016-02-18 08:41:12', '2016-02-18 08:41:12'), -(7, 'linkedin', NULL, NULL, '2016-02-18 08:41:12', '2016-02-18 08:41:12'), -(8, 'stumble', NULL, NULL, '2016-02-18 08:41:12', '2016-02-18 08:41:12'), -(9, 'google', NULL, NULL, '2016-02-18 08:41:12', '2016-02-18 08:41:12'), -(10, 'deviantart', NULL, NULL, '2016-02-18 08:41:12', '2016-02-18 08:41:12'), -(11, 'flickr', NULL, NULL, '2016-02-18 08:41:12', '2016-02-18 08:41:12'), -(12, 'skype', NULL, NULL, '2016-02-18 08:41:12', '2016-02-18 08:41:12'), -(13, 'rss', NULL, NULL, '2016-02-18 08:41:12', '2016-02-18 08:41:12'), -(14, 'twitter', NULL, NULL, '2016-02-18 08:41:12', '2016-02-18 08:41:12'), -(15, 'facebook', NULL, NULL, '2016-02-18 08:41:12', '2016-02-18 08:41:12'), -(16, 'youtube', NULL, NULL, '2016-02-18 08:41:12', '2016-02-18 08:41:12'), -(17, 'vimeo', NULL, NULL, '2016-02-18 08:41:12', '2016-02-18 08:41:12'), -(18, 'pinterest', NULL, NULL, '2016-02-18 08:41:12', '2016-02-18 08:41:12'), -(19, 'dribbble', NULL, NULL, '2016-02-18 08:41:12', '2016-02-18 08:41:12'), -(20, 'instagram', NULL, NULL, '2016-02-18 08:41:12', '2016-02-18 08:41:12'); +(1, 'footer1', NULL, NULL, '2016-04-19 22:39:55', '2016-04-19 22:39:55'), +(2, 'footer2', NULL, NULL, '2016-04-19 22:39:55', '2016-04-19 22:39:55'), +(3, 'footer3', NULL, NULL, '2016-04-19 22:39:55', '2016-04-19 22:39:55'), +(4, 'footer4', NULL, NULL, '2016-04-19 22:39:55', '2016-04-19 22:39:55'), +(5, 'side1', NULL, NULL, '2016-04-19 22:39:55', '2016-04-19 22:39:55'), +(6, 'side2', NULL, NULL, '2016-04-19 22:39:55', '2016-04-19 22:39:55'), +(7, 'linkedin', NULL, NULL, '2016-04-19 22:39:55', '2016-04-19 22:39:55'), +(8, 'stumble', NULL, NULL, '2016-04-19 22:39:55', '2016-04-19 22:39:55'), +(9, 'google', NULL, NULL, '2016-04-19 22:39:56', '2016-04-19 22:39:56'), +(10, 'deviantart', NULL, NULL, '2016-04-19 22:39:56', '2016-04-19 22:39:56'), +(11, 'flickr', NULL, NULL, '2016-04-19 22:39:56', '2016-04-19 22:39:56'), +(12, 'skype', NULL, NULL, '2016-04-19 22:39:56', '2016-04-19 22:39:56'), +(13, 'rss', NULL, NULL, '2016-04-19 22:39:56', '2016-04-19 22:39:56'), +(14, 'twitter', NULL, NULL, '2016-04-19 22:39:56', '2016-04-19 22:39:56'), +(15, 'facebook', NULL, NULL, '2016-04-19 22:39:56', '2016-04-19 22:39:56'), +(16, 'youtube', NULL, NULL, '2016-04-19 22:39:56', '2016-04-19 22:39:56'), +(17, 'vimeo', NULL, NULL, '2016-04-19 22:39:56', '2016-04-19 22:39:56'), +(18, 'pinterest', NULL, NULL, '2016-04-19 22:39:56', '2016-04-19 22:39:56'), +(19, 'dribbble', NULL, NULL, '2016-04-19 22:39:56', '2016-04-19 22:39:56'), +(20, 'instagram', NULL, NULL, '2016-04-19 22:39:56', '2016-04-19 22:39:56'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `workflow_action` +-- + +CREATE TABLE IF NOT EXISTS `workflow_action` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `workflow_id` int(10) unsigned NOT NULL, + `condition` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `action` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`), + KEY `workflow_action_1` (`workflow_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `workflow_name` +-- + +CREATE TABLE IF NOT EXISTS `workflow_name` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `status` int(11) NOT NULL, + `order` int(11) NOT NULL, + `target` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `internal_note` text COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `workflow_rules` +-- + +CREATE TABLE IF NOT EXISTS `workflow_rules` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `workflow_id` int(10) unsigned NOT NULL, + `matching_criteria` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `matching_scenario` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `matching_relation` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `matching_value` text COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`), + KEY `workflow_rules_1` (`workflow_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; -- -- Constraints for dumped tables @@ -1610,6 +1724,18 @@ ALTER TABLE `user_assign_organization` ADD CONSTRAINT `user_assign_organization_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON UPDATE NO ACTION, ADD CONSTRAINT `user_assign_organization_ibfk_1` FOREIGN KEY (`org_id`) REFERENCES `organization` (`id`) ON UPDATE NO ACTION; +-- +-- Constraints for table `workflow_action` +-- +ALTER TABLE `workflow_action` + ADD CONSTRAINT `workflow_action_1` FOREIGN KEY (`workflow_id`) REFERENCES `workflow_name` (`id`) ON UPDATE NO ACTION; + +-- +-- Constraints for table `workflow_rules` +-- +ALTER TABLE `workflow_rules` + ADD CONSTRAINT `workflow_rules_1` FOREIGN KEY (`workflow_id`) REFERENCES `workflow_name` (`id`) ON UPDATE NO ACTION; + /*!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 */; diff --git a/DB/update from 1.0.6.10 to 1.0.7/Updatedatabase.sql b/DB/update from 1.0.6.10 to 1.0.7/Updatedatabase.sql new file mode 100644 index 000000000..d8f3c4aac --- /dev/null +++ b/DB/update from 1.0.6.10 to 1.0.7/Updatedatabase.sql @@ -0,0 +1,1173 @@ +-- phpMyAdmin SQL Dump +-- version 4.1.14 +-- http://www.phpmyadmin.net +-- +-- Host: 127.0.0.1 +-- Generation Time: Apr 20, 2016 at 06:30 AM +-- Server version: 5.6.17 +-- PHP Version: 5.5.12 + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +SET time_zone = "+00:00"; + + +/*!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: `demodatabase` +-- + +-- -------------------------------------------------------- + +-- +-- Table structure for table `banlist` +-- + +CREATE TABLE IF NOT EXISTS `banlist` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `ban_status` tinyint(1) NOT NULL, + `email_address` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `internal_notes` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `canned_response` +-- + +CREATE TABLE IF NOT EXISTS `canned_response` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(10) unsigned NOT NULL, + `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `message` text COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`), + KEY `user_id` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `custom_forms` +-- + +CREATE TABLE IF NOT EXISTS `custom_forms` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `formname` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `custom_form_fields` +-- + +CREATE TABLE IF NOT EXISTS `custom_form_fields` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `forms_id` int(11) NOT NULL, + `label` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `value` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `required` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `date_format` +-- + +CREATE TABLE IF NOT EXISTS `date_format` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `format` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=10 ; + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `date_time_format` +-- + +CREATE TABLE IF NOT EXISTS `date_time_format` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `format` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=10 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `department` +-- + +CREATE TABLE IF NOT EXISTS `department` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `sla` int(10) unsigned DEFAULT NULL, + `manager` int(10) unsigned DEFAULT NULL, + `ticket_assignment` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `outgoing_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `template_set` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `auto_ticket_response` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `auto_message_response` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `auto_response_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `recipient` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `group_access` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `department_sign` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`), + KEY `sla` (`sla`), + KEY `manager_2` (`manager`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=4 ; + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `emails` +-- + +CREATE TABLE IF NOT EXISTS `emails` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `email_address` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `email_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `department` int(10) unsigned DEFAULT NULL, + `priority` int(10) unsigned DEFAULT NULL, + `help_topic` int(10) unsigned DEFAULT NULL, + `user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `password` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `fetching_host` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `fetching_port` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `fetching_protocol` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `fetching_encryption` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `mailbox_protocol` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `imap_config` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `folder` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `sending_host` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `sending_port` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `sending_protocol` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `sending_encryption` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `internal_notes` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `auto_response` tinyint(1) NOT NULL, + `fetching_status` tinyint(1) NOT NULL, + `move_to_folder` tinyint(1) NOT NULL, + `delete_email` tinyint(1) NOT NULL, + `do_nothing` tinyint(1) NOT NULL, + `sending_status` tinyint(1) NOT NULL, + `authentication` tinyint(1) NOT NULL, + `header_spoofing` tinyint(1) NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`), + KEY `department` (`department`,`priority`,`help_topic`), + KEY `department_2` (`department`,`priority`,`help_topic`), + KEY `priority` (`priority`), + KEY `help_topic` (`help_topic`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `groups` +-- + +CREATE TABLE IF NOT EXISTS `groups` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `group_status` tinyint(1) NOT NULL, + `can_create_ticket` tinyint(1) NOT NULL, + `can_edit_ticket` tinyint(1) NOT NULL, + `can_post_ticket` tinyint(1) NOT NULL, + `can_close_ticket` tinyint(1) NOT NULL, + `can_assign_ticket` tinyint(1) NOT NULL, + `can_transfer_ticket` tinyint(1) NOT NULL, + `can_delete_ticket` tinyint(1) NOT NULL, + `can_ban_email` tinyint(1) NOT NULL, + `can_manage_canned` tinyint(1) NOT NULL, + `can_manage_faq` tinyint(1) NOT NULL, + `can_view_agent_stats` tinyint(1) NOT NULL, + `department_access` tinyint(1) NOT NULL, + `admin_notes` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=4 ; + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `group_assign_department` +-- + +CREATE TABLE IF NOT EXISTS `group_assign_department` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `group_id` int(10) unsigned NOT NULL, + `department_id` int(10) unsigned NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`), + KEY `group_id` (`group_id`), + KEY `department_id` (`department_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `help_topic` +-- + +CREATE TABLE IF NOT EXISTS `help_topic` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `topic` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `parent_topic` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `custom_form` int(10) unsigned DEFAULT NULL, + `department` int(10) unsigned DEFAULT NULL, + `ticket_status` int(10) unsigned DEFAULT NULL, + `priority` int(10) unsigned DEFAULT NULL, + `sla_plan` int(10) unsigned DEFAULT NULL, + `thank_page` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `ticket_num_format` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `internal_notes` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `status` tinyint(1) NOT NULL, + `type` tinyint(1) NOT NULL, + `auto_assign` int(10) unsigned DEFAULT NULL, + `auto_response` tinyint(1) NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`), + KEY `custom_form` (`custom_form`), + KEY `department` (`department`), + KEY `ticket_status` (`ticket_status`), + KEY `priority` (`priority`), + KEY `sla_plan` (`sla_plan`), + KEY `auto_assign_2` (`auto_assign`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=4 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `kb_article` +-- + +CREATE TABLE IF NOT EXISTS `kb_article` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `slug` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `description` text COLLATE utf8_unicode_ci NOT NULL, + `status` tinyint(1) NOT NULL, + `type` tinyint(1) NOT NULL, + `publish_time` datetime DEFAULT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `kb_article_relationship` +-- + +CREATE TABLE IF NOT EXISTS `kb_article_relationship` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `article_id` int(10) unsigned NOT NULL, + `category_id` int(10) unsigned NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`), + KEY `article_relationship_article_id_foreign` (`article_id`), + KEY `article_relationship_category_id_foreign` (`category_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `kb_category` +-- + +CREATE TABLE IF NOT EXISTS `kb_category` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `slug` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `description` text COLLATE utf8_unicode_ci NOT NULL, + `status` tinyint(1) NOT NULL, + `parent` int(11) NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `kb_comment` +-- + +CREATE TABLE IF NOT EXISTS `kb_comment` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `article_id` int(10) unsigned NOT NULL, + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `website` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `comment` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `status` tinyint(1) NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`), + KEY `comment_article_id_foreign` (`article_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `kb_pages` +-- + +CREATE TABLE IF NOT EXISTS `kb_pages` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `status` tinyint(1) NOT NULL, + `visibility` tinyint(1) NOT NULL, + `slug` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `description` text COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `kb_settings` +-- + +CREATE TABLE IF NOT EXISTS `kb_settings` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `pagination` int(11) NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `languages` +-- + +CREATE TABLE IF NOT EXISTS `languages` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `locale` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=10 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `log_notification` +-- + +CREATE TABLE IF NOT EXISTS `log_notification` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `log` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `mailbox_protocol` +-- + +CREATE TABLE IF NOT EXISTS `mailbox_protocol` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `value` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=5 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `migrations` +-- + +CREATE TABLE IF NOT EXISTS `migrations` ( + `migration` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `batch` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `notifications` +-- + +CREATE TABLE IF NOT EXISTS `notifications` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `model_id` int(11) NOT NULL, + `userid_created` int(11) NOT NULL, + `type_id` int(11) NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `notification_types` +-- + +CREATE TABLE IF NOT EXISTS `notification_types` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `message` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `icon_class` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `organization` +-- + +CREATE TABLE IF NOT EXISTS `organization` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `phone` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `website` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `address` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `head` int(10) unsigned DEFAULT NULL, + `internal_notes` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`), + KEY `head` (`head`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `password_resets` +-- + +CREATE TABLE IF NOT EXISTS `password_resets` ( + `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `token` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `created_at` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + KEY `password_resets_email_index` (`email`), + KEY `password_resets_token_index` (`token`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `plugins` +-- + +CREATE TABLE IF NOT EXISTS `plugins` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `path` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `status` int(11) NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `send_mail` +-- + +CREATE TABLE IF NOT EXISTS `send_mail` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `driver` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `host` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `port` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `encryption` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `password` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `settings_alert_notice` +-- + +CREATE TABLE IF NOT EXISTS `settings_alert_notice` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `ticket_status` tinyint(1) NOT NULL, + `ticket_admin_email` tinyint(1) NOT NULL, + `ticket_department_manager` tinyint(1) NOT NULL, + `ticket_department_member` tinyint(1) NOT NULL, + `ticket_organization_accmanager` tinyint(1) NOT NULL, + `message_status` tinyint(1) NOT NULL, + `message_last_responder` tinyint(1) NOT NULL, + `message_assigned_agent` tinyint(1) NOT NULL, + `message_department_manager` tinyint(1) NOT NULL, + `message_organization_accmanager` tinyint(1) NOT NULL, + `internal_status` tinyint(1) NOT NULL, + `internal_last_responder` tinyint(1) NOT NULL, + `internal_assigned_agent` tinyint(1) NOT NULL, + `internal_department_manager` tinyint(1) NOT NULL, + `assignment_status` tinyint(1) NOT NULL, + `assignment_assigned_agent` tinyint(1) NOT NULL, + `assignment_team_leader` tinyint(1) NOT NULL, + `assignment_team_member` tinyint(1) NOT NULL, + `transfer_status` tinyint(1) NOT NULL, + `transfer_assigned_agent` tinyint(1) NOT NULL, + `transfer_department_manager` tinyint(1) NOT NULL, + `transfer_department_member` tinyint(1) NOT NULL, + `overdue_status` tinyint(1) NOT NULL, + `overdue_assigned_agent` tinyint(1) NOT NULL, + `overdue_department_manager` tinyint(1) NOT NULL, + `overdue_department_member` tinyint(1) NOT NULL, + `system_error` tinyint(1) NOT NULL, + `sql_error` tinyint(1) NOT NULL, + `excessive_failure` tinyint(1) NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `settings_auto_response` +-- + +CREATE TABLE IF NOT EXISTS `settings_auto_response` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `new_ticket` tinyint(1) NOT NULL, + `agent_new_ticket` tinyint(1) NOT NULL, + `submitter` tinyint(1) NOT NULL, + `participants` tinyint(1) NOT NULL, + `overlimit` tinyint(1) NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `settings_company` +-- + +CREATE TABLE IF NOT EXISTS `settings_company` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `company_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `website` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `phone` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `address` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `landing_page` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `offline_page` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `thank_page` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `logo` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `use_logo` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `settings_email` +-- + +CREATE TABLE IF NOT EXISTS `settings_email` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `template` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `sys_email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `alert_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `admin_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `mta` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `email_fetching` tinyint(1) NOT NULL, + `notification_cron` tinyint(1) NOT NULL, + `strip` tinyint(1) NOT NULL, + `separator` tinyint(1) NOT NULL, + `all_emails` tinyint(1) NOT NULL, + `email_collaborator` tinyint(1) NOT NULL, + `attachment` tinyint(1) NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `settings_ratings` +-- + +CREATE TABLE IF NOT EXISTS `settings_ratings` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `rating_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `publish` int(11) NOT NULL, + `modify` int(11) NOT NULL, + `slug` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`), + UNIQUE KEY `settings_ratings_slug_unique` (`slug`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `settings_system` +-- + +CREATE TABLE IF NOT EXISTS `settings_system` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `status` tinyint(1) NOT NULL, + `url` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `department` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `page_size` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `log_level` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `purge_log` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `api_enable` int(11) NOT NULL, + `api_key_mandatory` int(11) NOT NULL, + `api_key` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `name_format` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `time_farmat` int(10) unsigned DEFAULT NULL, + `date_format` int(10) unsigned DEFAULT NULL, + `date_time_format` int(10) unsigned DEFAULT NULL, + `day_date_time` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `time_zone` int(10) unsigned DEFAULT NULL, + `content` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`), + KEY `time_farmat` (`time_farmat`), + KEY `date_format` (`date_format`), + KEY `date_time_format` (`date_time_format`), + KEY `time_zone` (`time_zone`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `settings_ticket` +-- + +CREATE TABLE IF NOT EXISTS `settings_ticket` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `num_format` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `num_sequence` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `priority` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `sla` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `help_topic` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `max_open_ticket` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `collision_avoid` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `captcha` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `status` tinyint(1) NOT NULL, + `claim_response` tinyint(1) NOT NULL, + `assigned_ticket` tinyint(1) NOT NULL, + `answered_ticket` tinyint(1) NOT NULL, + `agent_mask` tinyint(1) NOT NULL, + `html` tinyint(1) NOT NULL, + `client_update` tinyint(1) NOT NULL, + `max_file_size` tinyint(1) NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `sla_plan` +-- + +CREATE TABLE IF NOT EXISTS `sla_plan` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `grace_period` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `admin_note` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `status` tinyint(1) NOT NULL, + `transient` tinyint(1) NOT NULL, + `ticket_overdue` tinyint(1) NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=4 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `teams` +-- + +CREATE TABLE IF NOT EXISTS `teams` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `status` tinyint(1) NOT NULL, + `team_lead` int(10) unsigned DEFAULT NULL, + `assign_alert` tinyint(1) NOT NULL, + `admin_notes` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`), + KEY `team_lead` (`team_lead`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=4 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `team_assign_agent` +-- + +CREATE TABLE IF NOT EXISTS `team_assign_agent` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `team_id` int(10) unsigned DEFAULT NULL, + `agent_id` int(10) unsigned DEFAULT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`), + KEY `team_id` (`team_id`), + KEY `agent_id` (`agent_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `template` +-- + +CREATE TABLE IF NOT EXISTS `template` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `status` tinyint(1) NOT NULL, + `template_set_to_clone` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `language` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `internal_note` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tickets` +-- + +CREATE TABLE IF NOT EXISTS `tickets` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `ticket_number` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `user_id` int(10) unsigned DEFAULT NULL, + `dept_id` int(10) unsigned DEFAULT NULL, + `team_id` int(10) unsigned DEFAULT NULL, + `priority_id` int(10) unsigned DEFAULT NULL, + `sla` int(10) unsigned DEFAULT NULL, + `help_topic_id` int(10) unsigned DEFAULT NULL, + `status` int(10) unsigned DEFAULT NULL, + `rating` tinyint(1) NOT NULL, + `ratingreply` tinyint(1) NOT NULL, + `flags` int(11) NOT NULL, + `ip_address` int(11) NOT NULL, + `assigned_to` int(10) unsigned DEFAULT NULL, + `lock_by` int(11) NOT NULL, + `lock_at` datetime DEFAULT NULL, + `source` int(10) unsigned DEFAULT NULL, + `isoverdue` int(11) NOT NULL, + `reopened` int(11) NOT NULL, + `isanswered` int(11) NOT NULL, + `html` int(11) NOT NULL, + `is_deleted` int(11) NOT NULL, + `closed` int(11) NOT NULL, + `is_transferred` tinyint(1) NOT NULL, + `transferred_at` datetime NOT NULL, + `reopened_at` datetime DEFAULT NULL, + `duedate` datetime DEFAULT NULL, + `closed_at` datetime DEFAULT NULL, + `last_message_at` datetime DEFAULT NULL, + `last_response_at` datetime DEFAULT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`), + KEY `user_id` (`user_id`), + KEY `dept_id` (`dept_id`), + KEY `team_id` (`team_id`), + KEY `priority_id` (`priority_id`), + KEY `sla` (`sla`), + KEY `help_topic_id` (`help_topic_id`), + KEY `status` (`status`), + KEY `assigned_to` (`assigned_to`), + KEY `source` (`source`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `ticket_attachment` +-- + +CREATE TABLE IF NOT EXISTS `ticket_attachment` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `thread_id` int(10) unsigned DEFAULT NULL, + `size` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `poster` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `file` mediumblob, + PRIMARY KEY (`id`), + KEY `thread_id` (`thread_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `ticket_collaborator` +-- + +CREATE TABLE IF NOT EXISTS `ticket_collaborator` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `isactive` tinyint(1) NOT NULL, + `ticket_id` int(10) unsigned DEFAULT NULL, + `user_id` int(10) unsigned DEFAULT NULL, + `role` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`), + KEY `ticket_id` (`ticket_id`), + KEY `user_id` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `ticket_form_data` +-- + +CREATE TABLE IF NOT EXISTS `ticket_form_data` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `ticket_id` int(10) unsigned DEFAULT NULL, + `title` text COLLATE utf8_unicode_ci NOT NULL, + `content` text COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`), + KEY `ticket_id` (`ticket_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `ticket_priority` +-- + +CREATE TABLE IF NOT EXISTS `ticket_priority` ( + `priority_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `priority` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `priority_desc` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `priority_color` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `priority_urgency` tinyint(1) NOT NULL, + `ispublic` tinyint(1) NOT NULL, + PRIMARY KEY (`priority_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=5 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `ticket_source` +-- + +CREATE TABLE IF NOT EXISTS `ticket_source` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `value` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=4 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `ticket_status` +-- + +CREATE TABLE IF NOT EXISTS `ticket_status` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `state` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `mode` int(11) NOT NULL, + `message` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `flags` int(11) NOT NULL, + `sort` int(11) NOT NULL, + `properties` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=6 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `ticket_thread` +-- + +CREATE TABLE IF NOT EXISTS `ticket_thread` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `ticket_id` int(10) unsigned DEFAULT NULL, + `user_id` int(10) unsigned DEFAULT NULL, + `poster` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `source` int(10) unsigned DEFAULT NULL, + `reply_rating` int(11) NOT NULL, + `rating_count` int(11) NOT NULL, + `is_internal` tinyint(1) NOT NULL, + `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `body` text COLLATE utf8_unicode_ci NOT NULL, + `format` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `ip_address` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`), + KEY `ticket_id_2` (`ticket_id`), + KEY `user_id` (`user_id`), + KEY `source` (`source`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `timezone` +-- + +CREATE TABLE IF NOT EXISTS `timezone` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `location` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=114 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `time_format` +-- + +CREATE TABLE IF NOT EXISTS `time_format` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `format` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=3 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `users` +-- + +CREATE TABLE IF NOT EXISTS `users` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `first_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `last_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `gender` tinyint(1) NOT NULL, + `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `ban` tinyint(1) NOT NULL, + `password` varchar(60) COLLATE utf8_unicode_ci NOT NULL, + `active` int(11) NOT NULL, + `ext` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `phone_number` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `mobile` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `agent_sign` text COLLATE utf8_unicode_ci NOT NULL, + `account_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `account_status` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `assign_group` int(10) unsigned DEFAULT NULL, + `primary_dpt` int(10) unsigned DEFAULT NULL, + `agent_tzone` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `daylight_save` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `limit_access` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `directory_listing` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `vacation_mode` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `company` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `role` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `internal_note` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `profile_pic` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`), + UNIQUE KEY `users_email_unique` (`email`), + KEY `assign_group_3` (`assign_group`), + KEY `primary_dpt_2` (`primary_dpt`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `user_assign_organization` +-- + +CREATE TABLE IF NOT EXISTS `user_assign_organization` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `org_id` int(10) unsigned DEFAULT NULL, + `user_id` int(10) unsigned DEFAULT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`), + KEY `org_id` (`org_id`), + KEY `user_id` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `user_notification` +-- + +CREATE TABLE IF NOT EXISTS `user_notification` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `notification_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + `is_read` int(11) NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `version_check` +-- + +CREATE TABLE IF NOT EXISTS `version_check` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `current_version` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `new_version` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `widgets` +-- + +CREATE TABLE IF NOT EXISTS `widgets` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, + `title` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `value` text COLLATE utf8_unicode_ci, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=21 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `workflow_action` +-- + +CREATE TABLE IF NOT EXISTS `workflow_action` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `workflow_id` int(10) unsigned NOT NULL, + `condition` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `action` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`), + KEY `workflow_action_1` (`workflow_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `workflow_name` +-- + +CREATE TABLE IF NOT EXISTS `workflow_name` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `status` int(11) NOT NULL, + `order` int(11) NOT NULL, + `target` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `internal_note` text COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `workflow_rules` +-- + +CREATE TABLE IF NOT EXISTS `workflow_rules` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `workflow_id` int(10) unsigned NOT NULL, + `matching_criteria` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `matching_scenario` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `matching_relation` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `matching_value` text COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`), + KEY `workflow_rules_1` (`workflow_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + +-- +-- Constraints for table `workflow_action` +-- +ALTER TABLE `workflow_action` + ADD CONSTRAINT `workflow_action_1` FOREIGN KEY (`workflow_id`) REFERENCES `workflow_name` (`id`) ON UPDATE NO ACTION; + +-- +-- Constraints for table `workflow_rules` +-- +ALTER TABLE `workflow_rules` + ADD CONSTRAINT `workflow_rules_1` FOREIGN KEY (`workflow_id`) REFERENCES `workflow_name` (`id`) ON UPDATE NO ACTION; + +-- +-- Constraints for table `ticket_thread` +-- +ALTER TABLE `ticket_thread` + ADD `reply_rating` INT(11) NOT NULL AFTER `source`, + ADD `rating_count` INT(11) NOT NULL AFTER `reply_rating`; + +/*!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 */;