From 047c69bd85bc5579ce6f352d7edf7fb950d84b80 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Fri, 15 Dec 2023 23:49:01 +0800 Subject: Improve CLI code and descriptions (#28482) * Close #28444 * Actually, it doesn't need to use that trick because it looks like it is not necessary, no user really needs it * Remove the hidden (legacy) "doctor" subcommand and update documents * Fix "actions" usage ![image](https://github.com/go-gitea/gitea/assets/2114189/3c2b34a7-4f92-4a6c-96fd-9505e413d4ec) --- docs/content/help/faq.en-us.md | 4 ++-- docs/content/help/faq.zh-cn.md | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'docs/content/help') diff --git a/docs/content/help/faq.en-us.md b/docs/content/help/faq.en-us.md index 93b3434f47..e6350936ef 100644 --- a/docs/content/help/faq.en-us.md +++ b/docs/content/help/faq.en-us.md @@ -362,7 +362,7 @@ If you are receiving errors on upgrade of Gitea using MySQL that read: > `ORM engine initialization failed: migrate: do migrate: Error: 1118: Row size too large...` -Please run `gitea convert` or run `ALTER TABLE table_name ROW_FORMAT=dynamic;` for each table in the database. +Please run `gitea doctor convert` or run `ALTER TABLE table_name ROW_FORMAT=dynamic;` for each table in the database. The underlying problem is that the space allocated for indices by the default row format is too small. Gitea requires that the `ROWFORMAT` for its tables is `DYNAMIC`. @@ -385,7 +385,7 @@ Unfortunately MySQL's `utf8` charset does not completely allow all possible UTF- They created a new charset and collation called `utf8mb4` that allows for emoji to be stored but tables which use the `utf8` charset, and connections which use the `utf8` charset will not use this. -Please run `gitea convert`, or run `ALTER DATABASE database_name CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;` +Please run `gitea doctor convert`, or run `ALTER DATABASE database_name CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;` for the database_name and run `ALTER TABLE table_name CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;` for each table in the database. diff --git a/docs/content/help/faq.zh-cn.md b/docs/content/help/faq.zh-cn.md index d7847a148d..909ca7e5e2 100644 --- a/docs/content/help/faq.zh-cn.md +++ b/docs/content/help/faq.zh-cn.md @@ -366,7 +366,7 @@ Gitea 提供了一个子命令`gitea migrate`来初始化数据库,然后您 > `ORM engine initialization failed: migrate: do migrate: Error: 1118: Row size too large...` -请运行`gitea convert`或对数据库中的每个表运行`ALTER TABLE table_name ROW_FORMAT=dynamic;`。 +请运行 `gitea doctor convert` 或对数据库中的每个表运行 `ALTER TABLE table_name ROW_FORMAT=dynamic;`。 潜在问题是默认行格式分配给每个表的索引空间 太小。Gitea 要求其表的`ROWFORMAT`为`DYNAMIC`。 @@ -389,9 +389,8 @@ SET GLOBAL innodb_large_prefix=1; 他们创建了一个名为 `utf8mb4`的字符集和校对规则,允许存储 Emoji,但使用 utf8 字符集的表和连接将不会使用它。 -请运行 `gitea convert` 或对数据库运行`ALTER DATABASE database_name CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;` -并对每个表运行 -`ALTER TABLE table_name CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;`。 +请运行 `gitea doctor convert` 或对数据库运行 `ALTER DATABASE database_name CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;` +并对每个表运行 `ALTER TABLE table_name CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;`。 您还需要将`app.ini`文件中的数据库字符集设置为`CHARSET=utf8mb4`。 -- cgit v1.2.3