Ver código fonte

update: fix mail log char type

tokumeikoi 2 anos atrás
pai
commit
cdadbf6509
2 arquivos alterados com 9 adições e 6 exclusões
  1. 6 6
      database/install.sql
  2. 3 0
      database/update.sql

+ 6 - 6
database/install.sql

@@ -84,14 +84,14 @@ CREATE TABLE `v2_knowledge` (
 DROP TABLE IF EXISTS `v2_mail_log`;
 CREATE TABLE `v2_mail_log` (
                                `id` int(11) NOT NULL AUTO_INCREMENT,
-                               `email` varchar(64) NOT NULL,
-                               `subject` varchar(255) NOT NULL,
-                               `template_name` varchar(255) NOT NULL,
-                               `error` text,
+                               `email` varchar(64) CHARACTER SET utf8 NOT NULL,
+                               `subject` varchar(255) CHARACTER SET utf8 NOT NULL,
+                               `template_name` varchar(255) CHARACTER SET utf8 NOT NULL,
+                               `error` text CHARACTER SET utf8,
                                `created_at` int(11) NOT NULL,
                                `updated_at` int(11) NOT NULL,
                                PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 
 
 DROP TABLE IF EXISTS `v2_notice`;
@@ -378,4 +378,4 @@ CREATE TABLE `v2_user` (
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 
--- 2022-05-28 18:13:17
+-- 2022-06-10 17:12:02

+ 3 - 0
database/update.sql

@@ -577,3 +577,6 @@ ADD `obfs_settings` varchar(255) NULL AFTER `obfs`;
 ALTER TABLE `v2_plan`
     CHANGE `name` `name` varchar(255) COLLATE 'utf8mb4_general_ci' NOT NULL AFTER `transfer_enable`,
     CHANGE `content` `content` text COLLATE 'utf8mb4_general_ci' NULL AFTER `renew`;
+
+ALTER TABLE `v2_mail_log`
+    COLLATE 'utf8mb4_general_ci';