From 36b8c081f6b9b642bc068158b3a893d027d06ba8 Mon Sep 17 00:00:00 2001 From: John Olheiser <42128690+jolheiser@users.noreply.github.com> Date: Tue, 5 Nov 2019 12:54:54 -0600 Subject: [PATCH] Add migrate command to docs (#8842) * Add migrate command to docs Signed-off-by: jolheiser * Link to CLI Signed-off-by: jolheiser * Clarify idempotence Signed-off-by: jolheiser * Sneak in convert command Signed-off-by: jolheiser --- docs/content/doc/help/faq.en-us.md | 4 ++++ docs/content/doc/usage/command-line.en-us.md | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/docs/content/doc/help/faq.en-us.md b/docs/content/doc/help/faq.en-us.md index 4e4d1aeecf..856e756db1 100644 --- a/docs/content/doc/help/faq.en-us.md +++ b/docs/content/doc/help/faq.en-us.md @@ -42,6 +42,7 @@ Also see [Support Options]({{< relref "doc/help/seek-help.en-us.md" >}}) * [SSH Common Errors](#ssh-common-errors) * [Missing releases after migration repository with tags](#missing-releases-after-migrating-repository-with-tags) * [LFS Issues](#lfs-issues) +* [How can I create users before starting Gitea](#how-can-i-create-users-before-starting-gitea) ## Difference between 1.x and 1.x.x downloads @@ -272,3 +273,6 @@ Check the value of `LFS_HTTP_AUTH_EXPIRY` in your `app.ini` file. By default, your LFS token will expire after 20 minutes. If you have a slow connection or a large file (or both), it may not finish uploading within the time limit. You may want to set this value to `60m` or `120m`. + +## How can I create users before starting Gitea +Gitea provides a sub-command `gitea migrate` to initialize the database, after which you can use the [admin CLI commands]({{< relref "doc/usage/command-line.en-us.md" >}}) to add users like normal. diff --git a/docs/content/doc/usage/command-line.en-us.md b/docs/content/doc/usage/command-line.en-us.md index 0955680af2..1bfaf8119b 100644 --- a/docs/content/doc/usage/command-line.en-us.md +++ b/docs/content/doc/usage/command-line.en-us.md @@ -281,3 +281,10 @@ provided key. You should also set the value NB: opensshd requires the gitea program to be owned by root and not writable by group or others. The program must be specified by an absolute path. + +#### migrate +Migrates the database. This command can be used to run other commands before starting the server for the first time. +This command is idempotent. + +#### convert +Converts an existing MySQL database from utf8 to utf8mb4.