mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-10 00:35:30 +01:00
Skip running system checks before migrate, then run them directly after instead
This commit is contained in:
parent
bae715cd34
commit
554bba839e
1 changed files with 9 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue