#!/usr/bin/env bash
set -euo pipefail

# scripts/migrate_and_collect.sh
# run makemigrations, migrate and collectstatic inside web container

echo "Running makemigrations..."
docker-compose exec web python manage.py makemigrations || true

echo "Running migrate..."
docker-compose exec web python manage.py migrate

echo "Collecting static files..."
docker-compose exec web python manage.py collectstatic --noinput

echo "Done"
