Django DB 마이그레이션 (Mysql -> Postgresql)

PostGIS를 위해 기존의 MySQL 데이터를 Postgresql로 옮긴 방법이다.

python manage.py dumpdata >/new-project/data.json
cd /new-project
python manage.py sqlflush | python manage.py dbshell
python manage.py loaddata data.json

No comments yet

댓글 남기기

아래 항목을 채우거나 오른쪽 아이콘 중 하나를 클릭하여 로그 인 하세요:

WordPress.com 로고

WordPress.com의 계정을 사용하여 댓글을 남깁니다. Log Out / 변경 )

Twitter picture

Twitter의 계정을 사용하여 댓글을 남깁니다. Log Out / 변경 )

Facebook 사진

Facebook의 계정을 사용하여 댓글을 남깁니다. Log Out / 변경 )

%s에 연결하는 중

팔로우

Get every new post delivered to your Inbox.