Phase 3.1: Enhanced Chore Logging and Reporting System
This commit is contained in:
37
backend/clear_cache_and_reset.bat
Normal file
37
backend/clear_cache_and_reset.bat
Normal file
@@ -0,0 +1,37 @@
|
||||
@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
|
||||
Reference in New Issue
Block a user