Quantcast

migrations error

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

migrations error

Carlos Rocha-5
Hi all,

When I install my first third party application in my model I create my initial migration and everything okay, after that probe I uninstall that application and create another new migration number 2, but it throws me an error because there is no longer the application in both the Setting as well as in my virtual environment.

This is a bug in migrations? i use django 1.10.x
when apply python manage.py migrate, this error it happens i say me, no exist the application X
and the error is in 0001_initial.py line where import the packages tha no longer exist

how to fix this error?

thx any helps

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/CAM-7rO1VJej%2Bjoh__0VH1dMk05r0w_WjD4Mb9ipF%2B7Owg14KZw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

migrations error

Camilo Torres
Hi,

Do you have the virtual environment active when you run the migrate command?

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/45c81c1e-4127-42e7-8b2f-9e5e38cc7f68%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: migrations error

Carlos Rocha-5
Hi, Camilo, yes of course, i see when create first 0001_initial.py files this file import the models for third party
app, but when uninstall app i apply news migrations i think django migration check all files i discover the import models for the third apps not exit anymore and raise the error, for me maybe this error the migrations a have put example:
initial.py
# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2017-02-09 17:07
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import hitcount.models     <----- this apps i uninstall
import sorl.thumbnail.fields
import taggit_autosuggest.managers

i create new migrations
0002_auto_numbers
# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2017-03-17 09:46
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):
   ....

when i erase this third apps hitcount, in settings. py and uninstall with pip,  I apply the new migrations this error raise:

RuntimeError: Model class hitcount.models.HitCount doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.

maybe is a logic bug the django migrations, because if I do not need an app anymore I have to uninstall it!!

Or I'm confused???

cheers


On Mon, Mar 20, 2017 at 4:10 PM, Camilo Torres <[hidden email]> wrote:
Hi,

Do you have the virtual environment active when you run the migrate command?

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/45c81c1e-4127-42e7-8b2f-9e5e38cc7f68%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
att.
Carlos Rocha

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/CAM-7rO2cNmcY-P1EOdNz-x3aupRS4jrdaVZi0cYYAJuTiU566g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...