django 1.8 버전에서 postgre 에 User를 만들수 없는 경우

django 1.8 이상 버전에서 migrate를 하면 auth_user 를 만들수 없다는 에러가 발생한다.
migrate auth를 먼저하고 나머지 migrate를 하면 정상적으로 수행된다.

django.db.utils.ProgrammingError: relation "auth_user" does not exist

shsong97:~/workspace (master) $ heroku run python manage.py migrate auth
Running python manage.py migrate auth on song-diary... up, run.7356
Operations to perform:
  Apply all migrations: auth
Running migrations:
  Rendering model states... DONE
  Applying contenttypes.0001_initial... OK
  Applying contenttypes.0002_remove_content_type_name... OK
  Applying auth.0001_initial... OK
  Applying auth.0002_alter_permission_name_max_length... OK
  Applying auth.0003_alter_user_email_max_length... OK
  Applying auth.0004_alter_user_username_opts... OK
  Applying auth.0005_alter_user_last_login_null... OK
  Applying auth.0006_require_contenttypes_0002... OK
shsong97:~/workspace (master) $ heroku run python manage.py migrate
Running python manage.py migrate on song-diary... up, run.8294
Operations to perform:
  Synchronize unmigrated apps: blog, messages, polls, user_manager, staticfiles, django_markdown
  Apply all migrations: sessions, auth, contenttypes, admin
Synchronizing apps without migrations:
  Creating tables...
    Creating table polls_polllist
    Creating table polls_poll
    Creating table polls_choice
    Creating table blog_blog
    Creating table blog_tag
    Creating table blog_bloglike
    Running deferred SQL...
  Installing custom SQL...
Running migrations:
  Rendering model states... DONE
  Applying admin.0001_initial... OK
  Applying sessions.0001_initial... OK
shsong97:~/workspace (master) $ heroku run python manage.py createsuperuser
Running python manage.py createsuperuser on song-diary... up, run.8161
Username (leave blank to use 'u38021'): shsong97
Email address: shsong97@gmail.com
Password:
Password (again):
Superuser created successfully.
shsong97:~/workspace (master) $

댓글

댓글 쓰기

이 블로그의 인기 게시물

dtsrun 실행하기

[MS SQL] SP수행 시간 및 작업빈도 확인

Slug가 뭘까?