본문 바로가기
DoItDJango

Django db.sqlite3 초기화

by 자동매매 2023. 4. 16.

1. 프로젝트의 db.sqlite3 삭제 (manage.py와 동일 위치의)

 

2. 각 앱별 migrations__init__.py를 제외한 모든 파일/폴더를 삭제한다

    - __pycache__ 폴더

    - 000으로 시작하는 초기화 파일

 

3. 앱별 makemigrations / migrate 실행

$ python manage.py makemigrations App명
$ python manage.py migrate App명

 

# 필요시 Django reinstall

pip install --upgrade --force-reinstall Django

 

'DoItDJango' 카테고리의 다른 글

Chapter 10: Bootstrap  (0) 2023.04.17
User Authentication  (0) 2023.04.17
User Accounts  (0) 2023.04.16
Forms  (0) 2023.04.15
Blog App  (0) 2023.04.15

댓글