tnnt-devteam / python-backend

Rework of the TNNT backend in Python for better maintainability
MIT License
0 stars 2 forks source link

reset_db.sh script should wipe out the 'auth_user' table in the scoreboard database #24

Closed k21971 closed 2 years ago

k21971 commented 2 years ago

Currently, once the reset_db.sh script is ran, any players that have played previously can no longer log in to the site until their entry is removed from the auth_user table. The script itself is pretty straightforward, but I'm not familiar enough with the migrate.py functions to fix this myself 😐

copperwater commented 2 years ago

I don't have the hardfought environment set up with multiple players logging in, so try adding this to reset_db.sh:

. secrets.sh
./manage.py wipe_db --all # <-- new line
./manage.py migrate scoreboard zero && rm -r scoreboard/migrations/* && \
    ./manage.py makemigrations scoreboard && ./manage.py migrate scoreboard

This should delete everything in User as well as Player, so does it fix the issue?

k21971 commented 2 years ago

Yup this works, thanks. I'll make a commit for this.

k21971 commented 2 years ago

Closed via 53f62f2.