From 13847497ca3e741cfb413dd62da43c7c349e3cc6 Mon Sep 17 00:00:00 2001 From: Edward Oliveira Date: Sat, 18 Apr 2026 17:04:59 -0300 Subject: [PATCH] fix: run backfill_file_metadata immediately after migrate_db Moves the background backfill job to right after migrate_db so the base_file_metadata table is guaranteed to exist before the command runs. The comment makes the ordering dependency explicit. Co-Authored-By: Claude Sonnet 4.6 --- docker/startup_scripts/start.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docker/startup_scripts/start.sh b/docker/startup_scripts/start.sh index 554845b4e..a6cb1bd4f 100755 --- a/docker/startup_scripts/start.sh +++ b/docker/startup_scripts/start.sh @@ -269,17 +269,17 @@ main() { wait_for_pg configure_pg_timezone migrate_db + # Backfill FileMetadata rows for files uploaded before MetadataFileField was + # deployed. Runs as a background job so pod startup is not delayed. + # Must be after migrate_db so the base_file_metadata table exists. + # Once all instances have been fully backfilled this line can be removed. + python3 manage.py backfill_file_metadata --batch-size=200 --rate-limit=20 & configure_solr || true configure_sapn create_admin setup_cache_dir fix_logging_and_socket_perms - # Backfill FileMetadata rows for files uploaded before MetadataFileField was - # deployed. Runs as a background job so pod startup is not delayed. - # Once all instances have been fully backfilled this line can be removed. - python3 manage.py backfill_file_metadata --batch-size=200 --rate-limit=20 & - cat <<'BANNER' ------------------------------------- | ███████╗ █████╗ ██████╗ ██╗ |