]> git.ipfire.org Git - thirdparty/patchwork.git/commit
docker: Drop database maintenance stuff
authorYou-Sheng Yang <vicamo@gmail.com>
Thu, 9 Dec 2021 03:38:41 +0000 (11:38 +0800)
committerStephen Finucane <stephen@that.guru>
Wed, 23 Feb 2022 13:43:59 +0000 (13:43 +0000)
commitc6996a92eeb39ef2ca488d41249d9b2d02ebdd89
treedad69d41535a811635831aa2d649ff8c37b340a1
parente9f2e08584f397b188dbcdd6f51bc03040992ecc
docker: Drop database maintenance stuff

Trying to re-create database inside a client docker could be risky and
error prone.

1. The previous handling process may fail service startup when an empty
database was created. `test_database()` will always succeed as it tests
only the existence of the database, not any table inside. Without
migrations being called on such empty database, patchwork cannot work
normally.

2. Checking the existence of a patchwork specific table is also invalid
under the empty database scenario, because migrations might still remain
to be done.

As a result, we shall test if the database exist and do migrations
always, so this change removes database maintenance functions.

Signed-off-by: You-Sheng Yang <vicamo@gmail.com>
Signed-off-by: Stephen Finucane <stephen@that.guru>
[stephenfin] Removed release note, since this is not end-user focused
docker-compose-pg.yml
docker-compose.yml
docs/development/installation.rst
tools/docker/entrypoint.sh