DELIMITER $$
DROP PROCEDURE IF EXISTS drop_index_if_exists $$
CREATE PROCEDURE drop_index_if_exists(in theTable varchar(128), in theIndexName varchar(128) )
  BEGIN
    IF((SELECT COUNT(*) AS index_exists FROM information_schema.statistics WHERE TABLE_SCHEMA = DATABASE() and table_name =
                                                                                                               theTable AND index_name = theIndexName) > 0) THEN
      SET @s = CONCAT('DROP INDEX ' , theIndexName , ' ON ' , theTable);
      PREPARE stmt FROM @s;
      EXECUTE stmt;
    END IF;
  END $$
DELIMITER ;

SET FOREIGN_KEY_CHECKS=0;
ALTER TABLE `canned_response` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
SET FOREIGN_KEY_CHECKS=1;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_134600_update_canned_response_table.php", 29);
ALTER TABLE `canned_response_tag` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_134700_update_canned_response_tag_table.php", 29);

ALTER TABLE `canned_response_tag_membership` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_134800_update_canned_response_tag_membership_table.php", 30);
ALTER TABLE `widget` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `operator_widget` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `widget_role` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Core/2016_09_12_152197_update_widget_table.php", 30);
ALTER TABLE `plugin_role` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Core/2016_09_12_152199_update_plugin_role_table.php", 30);
alter table `email_template_data` drop foreign key `email_template_data_language_code_foreign`;
alter table `user_organisation` drop foreign key `user_organisation_language_code_foreign`;
alter table `user` drop foreign key `user_language_code_foreign`;
ALTER TABLE `email_template_data` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `language` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `user` CHANGE `language_code` `language_code` VARCHAR(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL;
ALTER TABLE `user_organisation` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
alter table `email_template_data` add constraint `email_template_data_language_code_foreign` foreign key (`language_code`) references `language` (`code`) on delete cascade;
alter table `user_organisation` add constraint `user_organisation_language_code_foreign` foreign key (`language_code`) references `language` (`code`) on delete set null;
alter table `user` add constraint `user_language_code_foreign` foreign key (`language_code`) references `language` (`code`) on delete set null;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Core/2016_09_12_152200_update_language_table.php", 30);
ALTER TABLE `license` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Core/2016_09_12_152201_update_license_table.php", 30);

ALTER TABLE `plugin` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Core/2016_09_12_152202_update_plugin_table.php", 31);
ALTER TABLE `setting` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `setting` CHANGE `value` `value` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Core/2016_09_12_152203_update_setting_table.php", 31);
ALTER TABLE `upload` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `upload` CHANGE `filename` `filename` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL;
ALTER TABLE `upload` CHANGE `folder` `folder` VARCHAR(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL;
ALTER TABLE `upload` CHANGE `mime` `mime` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Core/2016_09_12_152204_update_upload_table.php", 31);
SET FOREIGN_KEY_CHECKS=0;
ALTER TABLE `article` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
SET FOREIGN_KEY_CHECKS=1;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Selfservice/2016_09_12_170600_update_article_table.php", 31);
ALTER TABLE `merge_log` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170600_update_merge_log_table.php", 31);


SET FOREIGN_KEY_CHECKS=0;
CALL drop_index_if_exists('user', 'firstname');
alter table `user` drop index `user_email_unique`;
ALTER TABLE `user` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `user` CHANGE `email` `email` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL;
alter table `user` add unique `user_email_unique`(`email`);
SET FOREIGN_KEY_CHECKS=1;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/User/2016_09_12_170600_update_user_table.php", 32);
alter table `article_type` drop index `article_type_slug_unique`;
ALTER TABLE `article_type` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Selfservice/2016_09_12_170601_update_article_type_table.php", 32);
SET FOREIGN_KEY_CHECKS=0;
ALTER TABLE ticket CHANGE number number VARCHAR(191) DEFAULT NULL COLLATE utf8_unicode_ci;
ALTER TABLE `ticket` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
SET FOREIGN_KEY_CHECKS=1;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170602_update_ticket_table.php", 32);
SET FOREIGN_KEY_CHECKS=0;
ALTER TABLE `ticket_message` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
SET FOREIGN_KEY_CHECKS=1;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170604_update_ticket_message_table.php", 32);
ALTER TABLE `activity_log` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Core/2016_09_12_170700_update_activity_log_table.php", 32);

ALTER TABLE `apitoken` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Core/2016_09_12_170701_update_apitoken_table.php", 33);
ALTER TABLE `article_attachment` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `article_attachment` CHANGE `original_name` `original_name` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Selfservice/2016_09_12_170703_update_article_attachment_table.php", 33);
ALTER TABLE `article_cat_membership` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Selfservice/2016_09_12_170704_update_article_cat_membership_table.php", 33);
ALTER TABLE `article_category` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Selfservice/2016_09_12_170705_update_article_category_table.php", 33);
ALTER TABLE `article_rating` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Selfservice/2016_09_12_170706_update_article_rating_table.php", 33);

ALTER TABLE `article_tag` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Selfservice/2016_09_12_170707_update_article_tag_table.php", 34);
ALTER TABLE `article_tag_membership` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Selfservice/2016_09_12_170708_update_article_tag_membership_table.php", 34);
ALTER TABLE `canned_response_group_membership` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170711_update_canned_response_group_membership_table.php", 34);
ALTER TABLE `comment` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Selfservice/2016_09_12_170712_update_comment_table.php", 34);
ALTER TABLE `comment_rating` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Selfservice/2016_09_12_170713_update_comment_rating_table.php", 34);

ALTER TABLE `company` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Core/2016_09_12_170714_update_company_table.php", 35);
ALTER TABLE `department` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170715_update_department_table.php", 35);
ALTER TABLE `department_customfield_membership` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170716_update_department_customfield_membership_table.php", 35);
ALTER TABLE `department_email` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170717_update_department_email_table.php", 35);
ALTER TABLE `department_operator_membership` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170718_update_department_operator_membership_table.php", 35);

ALTER TABLE `department_priority_membership` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170719_update_department_priority_membership_table.php", 36);
ALTER TABLE `email_batch` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Core/2016_09_12_170720_update_email_batch_table.php", 36);
ALTER TABLE `email_log` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Core/2016_09_12_170721_update_email_log_table.php", 36);
ALTER TABLE `email_queue` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Core/2016_09_12_170722_update_email_queue_table.php", 36);
ALTER TABLE `email_queue_attachments` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Core/2016_09_12_170723_update_email_queue_attachments_table.php", 36);

ALTER TABLE `email_template` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Core/2016_09_12_170724_update_email_template_table.php", 37);
ALTER TABLE `failed_login` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/User/2016_09_12_170726_update_failed_login_table.php", 37);
ALTER TABLE `feedback_form` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170727_update_feedback_form_table.php", 37);
ALTER TABLE `feedback_form_condition` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170728_update_feedback_form_condition_table.php", 37);
ALTER TABLE `feedback_form_condition_group` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170729_update_feedback_form_condition_group_table.php", 37);

ALTER TABLE `feedback_form_field` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170730_update_feedback_form_field_table.php", 38);
ALTER TABLE `feedback_form_field_option` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170731_update_feedback_form_field_option_table.php", 38);
ALTER TABLE `feedback_form_field_value` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170732_update_feedback_form_field_value_table.php", 38);
ALTER TABLE `feedback_log` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170733_update_feedback_log_table.php", 38);
ALTER TABLE `feedback_queue` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170734_update_feedback_queue_table.php", 38);

ALTER TABLE `group_role_membership` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/User/2016_09_12_170735_update_group_role_membership_table.php", 39);
ALTER TABLE `ip_ban` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Core/2016_09_12_170736_update_ip_ban_table.php", 39);
ALTER TABLE `ip_whitelist` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Core/2016_09_12_170737_update_ip_whitelist_table.php", 39);
ALTER TABLE `ldap_account` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/User/2016_09_12_170739_update_ldap_account_table.php", 39);
ALTER TABLE `module` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Core/2016_09_12_170743_update_module_table.php", 39);

ALTER TABLE `operator_login_log` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/User/2016_09_12_170744_update_operator_login_log_table.php", 40);
ALTER TABLE `operator_private_conversation` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/User/2016_09_12_170745_update_operator_private_conversation_table.php", 40);
ALTER TABLE `operator_private_message` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/User/2016_09_12_170746_update_operator_private_message_table.php", 40);
ALTER TABLE `operator_todo_widget` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/User/2016_09_12_170748_update_operator_todo_widget_table.php", 40);
ALTER TABLE `password_reset` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/User/2016_09_12_170750_update_password_reset_table.php", 40);

ALTER TABLE `permission` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Core/2016_09_12_170751_update_permission_table.php", 41);
ALTER TABLE `permission_role` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Core/2016_09_12_170752_update_permission_role_table.php", 41);
ALTER TABLE `plugin_setting` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Core/2016_09_12_170754_update_plugin_setting_table.php", 41);
ALTER TABLE `registration_confirmation` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/User/2016_09_12_170755_update_registration_confirmation_table.php", 41);
ALTER TABLE `role` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Core/2016_09_12_170756_update_role_table.php", 41);

ALTER TABLE `schedule` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Core/2016_09_12_170757_update_schedule_table.php", 42);
ALTER TABLE `schedule_holiday` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Core/2016_09_12_170758_update_schedule_holiday_table.php", 42);
ALTER TABLE `schedule_hours` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Core/2016_09_12_170759_update_schedule_hours_table.php", 42);
ALTER TABLE `scheduled_task` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Core/2016_09_12_170760_update_scheduled_task_table.php", 42);
ALTER TABLE `sla_condition` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170762_update_sla_condition_table.php", 42);

ALTER TABLE `sla_condition_group` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170763_update_sla_condition_group_table.php", 43);
ALTER TABLE `sla_escalation_rule` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170764_update_sla_escalation_rule_table.php", 43);
ALTER TABLE `sla_plan` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170765_update_sla_plan_table.php", 43);
ALTER TABLE `sla_priority_time` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170766_update_sla_priority_time_table.php", 43);
ALTER TABLE `sla_schedule_membership` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170767_update_sla_schedule_membership_table.php", 43);

ALTER TABLE `spam_rule` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Core/2016_09_12_170768_update_spam_rule_table.php", 44);
ALTER TABLE `ticket_attachment` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `ticket_attachment` CHANGE `original_name` `original_name` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170770_update_ticket_attachment_table.php", 44);
ALTER TABLE `ticket_channel` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170771_update_ticket_channel_table.php", 44);
ALTER TABLE `ticket_channel_account` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170772_update_ticket_channel_account_table.php", 44);
ALTER TABLE `ticket_channel_account_info` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170773_update_ticket_channel_account_info_table.php", 44);

ALTER TABLE `ticket_channel_account_ticket` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170774_update_ticket_channel_account_ticket_table.php", 45);
ALTER TABLE `ticket_channel_setting` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170775_update_ticket_channel_setting_table.php", 45);
ALTER TABLE `ticket_customfield` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170776_update_ticket_customfield_table.php", 45);
ALTER TABLE `ticket_customfield_option` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170777_update_ticket_customfield_option_table.php", 45);
ALTER TABLE `ticket_customfield_value` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170778_update_ticket_customfield_value_table.php", 45);

ALTER TABLE `ticket_escalation_rule` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170779_update_ticket_escalation_rule_table.php", 46);
ALTER TABLE `ticket_filter` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170780_update_ticket_filter_table.php", 46);
ALTER TABLE `ticket_filter_condition` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170781_update_ticket_filter_condition_table.php", 46);
ALTER TABLE `ticket_filter_condition_group` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170782_update_ticket_filter_condition_group_table.php", 46);
ALTER TABLE `ticket_filter_group_membership` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170783_update_ticket_filter_group_membership_table.php", 46);

ALTER TABLE `ticket_followup` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170784_update_ticket_followup_table.php", 47);
ALTER TABLE `ticket_followup_action` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170785_update_ticket_followup_action_table.php", 47);
ALTER TABLE `ticket_macro` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170786_update_ticket_macro_table.php", 47);
ALTER TABLE `ticket_macro_action` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170787_update_ticket_macro_action_table.php", 47);
ALTER TABLE `ticket_macro_condition` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170788_update_ticket_macro_condition_table.php", 47);

ALTER TABLE `ticket_macro_condition_group` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170789_update_ticket_macro_condition_group_table.php", 48);
ALTER TABLE `ticket_macro_run` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170790_update_ticket_macro_run_table.php", 48);
ALTER TABLE `ticket_operator_membership` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170792_update_ticket_operator_membership_table.php", 48);
ALTER TABLE `ticket_priority` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170793_update_ticket_priority_table.php", 48);
ALTER TABLE `ticket_status` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170794_update_ticket_status_table.php", 48);

ALTER TABLE `ticket_tag_membership` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170796_update_ticket_tag_membership_table.php", 49);
ALTER TABLE `ticket_viewed` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170797_update_ticket_viewed_table.php", 49);
ALTER TABLE `ticket_tag` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/Ticket/2016_09_12_170798_update_ticket_tag_table.php", 49);
ALTER TABLE `user_customfield` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/User/2016_09_12_170800_update_user_customfield_table.php", 49);
ALTER TABLE `user_customfield_option` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/User/2016_09_12_170801_update_user_customfield_option_table.php", 49);

ALTER TABLE `user_customfield_value` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/User/2016_09_12_170802_update_user_customfield_value_table.php", 50);
ALTER TABLE `user_group` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/User/2016_09_12_170803_update_user_group_table.php", 50);
ALTER TABLE `user_membership` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/User/2016_09_12_170804_update_user_membership_table.php", 50);
ALTER TABLE `mass_email` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/User/2016_09_12_171901_update_mass_email_table.php", 50);
ALTER TABLE `mass_email_queue` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/User/2016_09_12_171902_update_mass_email_queue_table.php", 50);

ALTER TABLE `mass_email_group_membership` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/User/2016_09_12_171903_update_mass_email_group_membership_table.php", 51);
ALTER TABLE `mass_email_upload_membership` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/User/2016_09_12_171904_update_mass_email_upload_membership_table.php", 51);
ALTER TABLE `mass_email_addresses` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/User/2016_09_12_171905_update_mass_email_addresses_table.php", 51);
ALTER TABLE `operator_setting` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/User/2016_09_12_171906_update_operator_setting_table.php", 51);
ALTER TABLE `migrations` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/2016_09_12_199600_update_migrations_table.php", 51);

ALTER TABLE `operator_canned_response_usage` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
insert into `migrations` (`migration`, `batch`) values ("database/migrations/2.1.0/User/2016_09_12_204200_update_operator_canned_response_usage_table.php", 52);
