創用 CC 授權條款
除非另有註明,本網站的著作Fygul Hether製作,以創用CC 姓名標示-非商業性-禁止改作 4.0 國際 授權條款釋出。

2016年1月13日 星期三

Two error messages about Django migrate

  • django.db.Migrations.state.InvalidBaseError
  • psycopg2.programingerror "foo" relation dose not exit

One of these error messages might happen while I migrating a Django project with many Apps.

The second error happened if I used PostgreSQL.

A work around for this annoyance is to employ a two-phase migration.

First, comment out Apps in settings.py, but leave Django's Apps alone. Run './manage.py migrate'

Then, uncomment Apps, migrate again.

沒有留言:

張貼留言