Swaroop Kumar
Swaroop Kumar

Reputation: 113

How to manage migrations in django 1.7 among developers?

We are 2 developers working on a django application. As we are in the initial stages of the app our models are changing rapidly and so are django migration files. So if one of us pushes the migrations to git and when the other one pulls them and tries to apply them, django is not able to find a common migration point as he also would have made some model changes. Please suggest a clean way to resolve this issue.

Upvotes: 4

Views: 65

Answers (1)

doniyor
doniyor

Reputation: 37894

so there are developers A and B.

if it is very important you both have notification enabled in git so that you know what your friend has pushed.

lets imagine, A and B are working at the same time on same django app, possibly on the same models.py.

if A pushes changes on models.py, B needs to apply these changes in his local version before he pushes. if B pushes his changes, A needs to apply them first before he pushes. in this way, both local versions will have the same migration history. this is how I do with my friends..

any improvement to what i say is highly appreciated

Upvotes: 1

Related Questions