38 lines
946 B
Batchfile
38 lines
946 B
Batchfile
@echo off
|
|
echo ============================================================
|
|
echo Clearing Python Cache and Resetting Database
|
|
echo ============================================================
|
|
echo.
|
|
|
|
echo 1. Stopping any running backend servers...
|
|
taskkill /F /IM python.exe 2>nul
|
|
timeout /t 2 >nul
|
|
|
|
echo 2. Deleting Python cache files...
|
|
for /d /r %%d in (__pycache__) do @if exist "%%d" (
|
|
rd /s /q "%%d"
|
|
echo Deleted: %%d
|
|
)
|
|
|
|
echo 3. Deleting .pyc files...
|
|
del /s /q "*.pyc" 2>nul
|
|
|
|
echo 4. Deleting database...
|
|
if exist "data\family_hub.db" (
|
|
del /q "data\family_hub.db"
|
|
echo Database deleted
|
|
) else (
|
|
echo No database found
|
|
)
|
|
|
|
echo 5. Running database reset...
|
|
call venv\Scripts\activate.bat
|
|
python reset_database.py
|
|
|
|
echo.
|
|
echo ============================================================
|
|
echo Cache cleared and database reset complete!
|
|
echo ============================================================
|
|
echo.
|
|
pause
|