mirror of
https://github.com/yogeshojha/rengine.git
synced 2026-10-01 06:04:54 +02:00
fix celery entrypoint to have app specific makemigrations
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user