ks.dgoon.lee log

cleanup sqlite db in django dev


2023/10/31 22:52:18 #django #dev #database #sqlite

개발중에 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개