Does deleting migrations and database in dev, cause issues when pushing to production?

梦想的初衷 提交于 2021-01-28 21:12:58

问题


I had a conflict in my development database, so to make things easier for me I deleted all my migrations and dropped database and created a new one. Now in development every thing works correctly:

find . -path "*/migrations/*.py" -not -name "__init__.py" -delete
find . -path "*/migrations/*.pyc"  -delete

dropdb 'mydb'
createdb 'mydb'

python manage.py makemigrations
python manage.py migrate

I then saved a git commit and pushed to production and got the following error: django.db.utils.ProgrammingError: column "shop_id" of relation "subscribers_subscriber" already exists

Note: I am using a postgresql database

Should I not have deleted my development database?

来源:https://stackoverflow.com/questions/63111620/does-deleting-migrations-and-database-in-dev-cause-issues-when-pushing-to-produ

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!