J
J
Jekson2020-06-01 14:07:47
Django
Jekson, 2020-06-01 14:07:47

How to resolve a migration conflict?

There was a situation when a message appeared on the server

CommandError: Conflicting migrations detected; multiple leaf nodes in the migration graph: (0063_auto_20200530_1040, 0062_merge_20200527_1444 in vendors).
To fix them run 'python manage.py makemigrations --merge'

I ran the above command but now I have a question. A new migration file appeared during execution
Created new merge migration /home/ubuntu/spend-matters/apps/vendors/migrations/0064_merge_20200601_0807.py

But this file is not available on localhost and on github, so each time you pull new code from github to a server, there will be a problem with the difference in migrate.
How to properly fix this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
noremorse_ru, 2020-06-01
@noremorse_ru

Carrying migrations across repositories is considered bad manners, no migrations - no problems

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question