From 8cfd627329cccec31e49ba0d68481279b17c2a12 Mon Sep 17 00:00:00 2001 From: Jason Song Date: Wed, 7 Dec 2022 23:58:31 +0800 Subject: [PATCH] Support disabling database auto migration (#22053) Gitea will migrate the database model version automatically, but it should be able to be disabled and keep Gitea shutdown if the version is not matched. --- doc/advanced/config-cheat-sheet.en-us.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/advanced/config-cheat-sheet.en-us.md b/doc/advanced/config-cheat-sheet.en-us.md index 756ab322..37f03b42 100644 --- a/doc/advanced/config-cheat-sheet.en-us.md +++ b/doc/advanced/config-cheat-sheet.en-us.md @@ -444,6 +444,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a - `MAX_OPEN_CONNS` **0**: Database maximum open connections - default is 0, meaning there is no limit. - `MAX_IDLE_CONNS` **2**: Max idle database connections on connection pool, default is 2 - this will be capped to `MAX_OPEN_CONNS`. - `CONN_MAX_LIFETIME` **0 or 3s**: Sets the maximum amount of time a DB connection may be reused - default is 0, meaning there is no limit (except on MySQL where it is 3s - see #6804 & #7071). +- `AUTO_MIGRATION` **true**: Whether execute database models migrations automatically. Please see #8540 & #8273 for further discussion of the appropriate values for `MAX_OPEN_CONNS`, `MAX_IDLE_CONNS` & `CONN_MAX_LIFETIME` and their relation to port exhaustion.