#22932: "makemigrations" generates circular dependencies
-------------------------------------+-------------------------------------
     Reporter:  humitos              |                    Owner:  nobody
         Type:  Bug                  |                   Status:  closed
    Component:  Migrations           |                  Version:  master
     Severity:  Normal               |               Resolution:  fixed
     Keywords:  circular             |             Triage Stage:
  dependency, migrations,            |  Unreviewed
  makemigrations                     |      Needs documentation:  0
    Has patch:  0                    |  Patch needs improvement:  0
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by humitos):

 Well, I followed the solution suggested by `andrewgodwin` and it worked. I
 will explain here what are the specific steps that I followed (actually, I
 followed these steps in the production site and it also worked):

 1. Download the .tar.gz and uncompress it in /tmp, then cd into it
 1. Run `dj makemigrations`
 1. Remove the `swappable_dependency` and the
 `migrations.CreateModel(name='TeamCaptain', ...` from
 `team.0001_initial.py`
 1. Run `dj makemigrations --empty team`
 1. Edit this new empty migration created by Django by adding the
 `swappable_dependency` and the `migrations.CreateModel(name='TeamCaptain',
 ...` removed from `team.0001_initial.py`
 1. Run `dj migrate`

 I'm attaching the .diff and the new migration

-- 
Ticket URL: <https://code.djangoproject.com/ticket/22932#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.34a3f3cb25bbecf007faecfa8b3d07d2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to