- 확인한 에러 코드
InconsistentMigrationHistory: Migration socialaccount.0001_initial is applied before its dependency sites.0001_initial
-> 연관되지 않은 마이그레이션 히스토리 : socialaccount 마이그레이션은 sites 앱에 의존
-> 그러나 sites가 적용되기 전에 socialaccount가 먼저 마이그레이션
-> 충돌
해결 방법
(1) django_migrations 테이블에서 socialaccount 관련 레코드 삭제
- mysql을 사용하는 관계로 아래 코드를 mysql에 접속해 입력한다.
mysql -u 사용자이름 -p
# 비밀번호 입력
USE schello;
DELETE FROM django_migrations WHERE app = 'socialaccount';
(2) .venv 터미널로 돌아가서 마이그레이션 순서대로 다시 실행
python manage.py migrate sites
python manage.py migrate socialaccount'에러 모음' 카테고리의 다른 글
| [Django] SocialApp.DoesNotExist (0) | 2025.06.09 |
|---|---|
| [Django] Table '프로젝트명.socialaccount_socialapp_sites' doesn't exist (0) | 2025.06.03 |
| [Django] Table '프로젝트명.django_site' doesn't exist (0) | 2025.06.03 |
| [Django] Django adminstration 에 SITES가 없을 때 (0) | 2025.06.03 |
| [Django] ModuleNotFoundError: No module named 'requests' (0) | 2025.06.03 |