Results-Page/create_dummy_data.bat
2023-05-08 17:21:07 +01:00

24 lines
627 B
Batchfile

@echo off
echo The purpose of this file is to populate the database with dummy data for testing. Running this WILL DELETE your current sqlite3 database.
set /p confirm=Do you want to continue? [y/n]
if /i "%confirm%"=="y" (
cd /d %~dp0
if exist src\db.sqlite3 (
del src\db.sqlite3
)
call venv\Scripts\activate.bat
python src/manage.py migrate
python src/manage.py create_teams_fixture 10
python src/manage.py loaddata teams_fixture
python src/manage.py create_members_fixture 3
python src/manage.py loaddata members_fixture
deactivate
) else (
echo Exiting script...
)