16 lines
539 B
Bash
Executable File
16 lines
539 B
Bash
Executable File
#!/bin/bash
|
|
# Django migration check script for pre-commit
|
|
|
|
cd "$(dirname "$0")/../src" || exit 1
|
|
|
|
export PYTHONPATH=.
|
|
export DJANGO_SETTINGS_MODULE=config.settings.development
|
|
|
|
if uv run python manage.py makemigrations --check --dry-run; then
|
|
echo "✓ Django migrations are up to date"
|
|
exit 0
|
|
else
|
|
echo "⚠ Warning: Django migrations check failed (may be due to configuration issues)"
|
|
echo " This doesn't prevent commits, but you should check migrations manually"
|
|
exit 0 # Exit with success to not block commits
|
|
fi |