It looks like your migration history is corrupted somehow (migrations 10-22 
are applied but not their dependency 0001). You might need to manually add 
a row to the django_migrations table to reflect the fact that 0001 is 
applied. If you can provide steps that reproduce how you got to such a bad 
state, please open a ticket with details.

On Tuesday, April 12, 2016 at 6:25:51 PM UTC-4, Aaron C. de Bruyn wrote:
>
> * My project has been around since the Django 1.2 days.
> * Some time around 1.8.x I ran squashmigrations and everything worked 
> perfectly.
> * I've done lots of migrations since then.
> * I updated the app to Python 3.
> * Everything was working perfectly
>
> I just did my first makemigration under python 3.  Specifically I added a 
> Boolean 'enabled' field to a model.
>
> The migration appears to have been created properly, but when I try to run 
> the 'migrate' command, it tries to apply 
> 0001_squashed_0009_auto_20150109_1447.
>
> I tried to fake it by running 'manage.py migrate myapp 0001 --fake' and it 
> says it applied (faked).
> Running 'manage.py migrate' shows it trying to apply the 0001_squashed... 
> migration again.
>
> I also tried using the --fake-initial flag with no luck.
>
> 'showmigrations' show every migration since the squash has been applied, 
> just not the squashed migration or the most recent one I just created:
>
> myapp
>  [ ] 0001_squashed_0009_auto_20150109_1447 (9 squashed migrations)
>  [X] 0010_auto_20150109_1824
>  [X] 0011_auto_20150818_1946
>  [X] 0012_auto_20150829_1610
>  [X] 0013_auto_20150829_1610
>  [X] 0014_auto_20150829_1618
>  [X] 0015_auto_20150829_1618
>  [X] 0016_remove_internetprovider_old_phone
>  [X] 0017_office_linked_location
>  [X] 0018_auto_20150829_2345
>  [X] 0019_office_pib_version
>  [X] 0020_auto_20150908_1643
>  [X] 0021_internetservice_notes
>  [X] 0022_office_last_router_backup_alert
>  [ ] 0023_auto_20160412_1433
>
> How can I get the system to recognize that 0001_squashed... has been 
> applied already?
>
> Thanks,
>
> -A
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ff5aaf7f-9be8-410f-8875-9d11e1e6a5f1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to