问题
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