#!/bin/bash
# Reset script for django-rsgi example project

set -e  # Exit on any error

echo "🗑️  Resetting django-rsgi example project..."
echo ""

# Change to project directory
cd "$(dirname "$0")/.."

echo "🗄️  Removing database..."
rm -f db.sqlite3

echo "📁 Cleaning migration files..."
find . -path "*/migrations/*.py" -not -name "__init__.py" -delete
find . -path "*/migrations/*.pyc" -delete

echo "🔧 Recreating migrations..."
uv run python manage.py makemigrations

echo ""
echo "✅ Reset complete!"
echo ""
echo "🎯 Run './bin/setup' to reinitialize the project."
