fix celery entrypoint to have app specific makemigrations

This commit is contained in:
Yogesh Ojha
2024-09-11 07:26:06 +05:30
parent 699495f7bd
commit 96b47dfd3d
+34 -1
View File
@@ -1,7 +1,40 @@
#!/bin/bash
python3 manage.py makemigrations
# apply existing migrations
python3 manage.py migrate
# make migrations for specific apps
apps=(
"targetApp"
"scanEngine"
"startScan"
"dashboard"
"recon_note"
)
create_migrations() {
local app=$1
echo "Creating migrations for $app..."
python3 manage.py makemigrations $app
echo "Finished creating migrations for $app"
echo "----------------------------------------"
}
echo "Starting migration creation process..."
for app in "${apps[@]}"
do
create_migrations $app
done
echo "Migration creation process completed."
# apply migrations again
echo "Applying migrations..."
python3 manage.py migrate
echo "Migration process completed."
python3 manage.py collectstatic --no-input --clear
# Load default engines, keywords, and external tools