]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Skip running system checks before migrate, then run them directly after instead
authorTrenton H <797416+stumpylog@users.noreply.github.com>
Wed, 14 Dec 2022 21:39:07 +0000 (13:39 -0800)
committerTrenton H <797416+stumpylog@users.noreply.github.com>
Thu, 15 Dec 2022 19:50:15 +0000 (11:50 -0800)
docker/docker-prepare.sh

index c3a01ec8d2715cfd51415c97aaf20bfb0020088b..e7203fd8dd25c074d96508ee5930b8ba05c84bf1 100755 (executable)
@@ -20,7 +20,6 @@ wait_for_postgres() {
                        exit 1
                else
                        echo "Attempt $attempt_num failed! Trying again in 5 seconds..."
-
                fi
 
                attempt_num=$(("$attempt_num" + 1))
@@ -67,10 +66,16 @@ migrations() {
                # of the current container starts.
                flock 200
                echo "Apply database migrations..."
-               python3 manage.py migrate
+               python3 manage.py migrate --skip-checks --no-input
        ) 200>"${DATA_DIR}/migration_lock"
 }
 
+django_checks() {
+       # Explicitly run the Django system checks
+       echo "Running Django checks"
+       python3 manage.py check
+}
+
 search_index() {
 
        local -r index_version=1
@@ -100,6 +105,8 @@ do_work() {
 
        migrations
 
+       django_checks
+
        search_index
 
        superuser