Closed gwonmin-tesla closed 1 month ago
빌드후 project manager 컨테이너 실행시 로그 확인시 다음과 같이 Django database migration 에러가 발생할 수 있다.
$ docker logs tango-project_manager-1
2024/06/20 02:06:55 Waiting for host: tcp://postgresql:5432
2024/06/20 02:06:55 Connected to tcp://postgresql:5432
Apply database migrations
['manage.py', 'makemigrations', 'tango']
['manage.py', 'makemigrations', 'tango']
No changes detected in app 'tango'
['manage.py', 'makemigrations', 'datasets']
['manage.py', 'makemigrations', 'datasets']
No changes detected in app 'datasets'
['manage.py', 'makemigrations', 'targets']
['manage.py', 'makemigrations', 'targets']
No changes detected in app 'targets'
['manage.py', 'migrate']
['manage.py', 'migrate']
Operations to perform:
Apply all migrations: admin, auth, contenttypes, oauth2_provider, sessions, tango, targets
Running migrations:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/django/db/backends/utils.py", line 82, in _execute
return self.cursor.execute(sql)
psycopg2.errors.DuplicateTable: relation "target" already exists
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "manage.py", line 22, in <module>
main()
File "manage.py", line 18, in main
execute_from_command_line(sys.argv)
아래와 같은 순서로 해결한다.
Common target set은 현재 사용자가 내용을 수정할 수 없음.
Common dataset을 프로젝트 설정시 선택하고 다운로드되어 있지 않다면 다운로드하는 대신, 프로젝트 매니저 메인 화면 좌측에 Dataset Management 메뉴를 추가하고, 개별적으로 다운로드 할 수 있도록 수정 요망
PR 타입
하나 이상의 PR 타입을 선택해주세요.
PR전 체크 사항
PR전 아래 사항을 확인하였는지 체크하시고 PR 생성 바랍니다.
관련 이슈
160
159
PR 반영 브랜치
teslasystem_vue -> main
변경 사항
Common Dataset 및 Target 생성 기능 추가 thumbnail 이미지 생성 로직 수정
테스트 결과
정상작동 확인