OH-SHOWN / ohshown-backend

OH!SHOWN 野生動物出沒痕跡通報系統
http://ohshown.site
MIT License
2 stars 8 forks source link

docs(docker): guide to purge testing database #55

Closed tai271828 closed 2 years ago

tai271828 commented 2 years ago

Add guide regarding how to purge the testing DB without rebooting your system.

tai271828 commented 2 years ago

@EagleC0318 @yanghaochang104 I think this is what we talked about ~1 weeks ago.

tai271828 commented 2 years ago

This pull request relates to https://github.com/OH-SHOWN/ohshown-backend/issues/54

tai271828 commented 2 years ago

If anyone tries the method and it's ok for you. Please let me know. I will then upstream this README update to disfactor repo as well : )

EagleC0318 commented 2 years ago

@tai271828 if I run this purge command and then start the test docker env again, would the default test data be still there? If so, what's the data I purged? The data I added manually on the last test?

tai271828 commented 2 years ago

@tai271828 if I run this purge command and then start the test docker env again, would the default test data be still there? If so, what's the data I purged? The data I added manually on the last test?

  1. The default test data will be https://github.com/OH-SHOWN/ohshown-backend/pull/49 (total 9 entries) , which is injected via python manage.py migrate automatically.
  2. Yes, the data you purged is the data you uploaded (if you reported oh-shown events during your development) a.k.a. "The data I added manually on the last test"