update: fix ticket message length support utf8mb4

This commit is contained in:
tokumeikoi 2021-08-18 21:23:45 +09:00
parent c9cd307cc4
commit c957a4ca83
3 changed files with 9 additions and 3 deletions

View File

@ -12,6 +12,7 @@ use Illuminate\Support\Facades\DB;
class TicketService {
public function replyByAdmin($ticketId, $message, $userId):void
{
if ($message)
$ticket = Ticket::where('id', $ticketId)
->first();
if (!$ticket) {

View File

@ -207,7 +207,9 @@ CREATE TABLE `v2_server_log` (
`created_at` int(11) NOT NULL,
`updated_at` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `log_at` (`log_at`)
KEY `log_at` (`log_at`),
KEY `user_id` (`user_id`),
KEY `server_id` (`server_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@ -305,7 +307,7 @@ CREATE TABLE `v2_ticket_message` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`ticket_id` int(11) NOT NULL,
`message` varchar(255) NOT NULL,
`message` text CHARACTER SET utf8mb4 NOT NULL,
`created_at` int(11) NOT NULL,
`updated_at` int(11) NOT NULL,
PRIMARY KEY (`id`)
@ -349,4 +351,4 @@ CREATE TABLE `v2_user` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- 2021-07-30 17:19:01
-- 2021-08-18 12:22:48

View File

@ -432,3 +432,6 @@ ALTER TABLE `v2_order`
ALTER TABLE `v2_server_log`
ADD INDEX `user_id` (`user_id`),
ADD INDEX `server_id` (`server_id`);
ALTER TABLE `v2_ticket_message`
CHANGE `message` `message` text COLLATE 'utf8mb4_general_ci' NOT NULL AFTER `ticket_id`;