first commit
This commit is contained in:
16
scripts/check-migrations.sh
Executable file
16
scripts/check-migrations.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user