Django makemigrations 坑请注意(relation does not exist)
情景描述
今天在迁移项目时,发现运行python manage makemigrations 后出现问题了。很多表总是无法生成,后来Google到解决方案,原来django 的makemigrations 会造成表格不全
django.db.utils.ProgrammingError: relation “UserCoreApp_userstype” does not exist
LINE 1: SELECT COUNT(*) AS “__count” FROM “UserCoreApp_userstype”
解决方案
单独运行makemigrations
python manage.py migrate UserCoreApp