모든 기록

cleanup sqlite db in django dev

개발중에 sqlite3 db 깔끔하게 날리고 다시 띄우기. 그냥 지웠더니 꼬이는 경우가 생기더라.

find . -path "*/migrations/*.py" -not -name "__init__.py" -delete
find . -path "*/migrations/*.pyc"  -delete
rm db.sqlite3
python manage.py migrate --run-syncdb
python manage.py makemigrations
python manage.py migrate
https://simpleisbetterthancomplex.com/tutorial/2016/07/26/how-to-reset-migrations.html


댓글 0

댓글 남기기

댓글 수정·삭제