migration not included in python package, causing migrations not to run
peterlauri opened this issue · comments
Fixed in #27
Shown by first installing package normally, and then from my master.
# virtualenv ve1
New python executable in ve1/bin/python2.7
Also creating executable in ve1/bin/python
Installing setuptools, pip, wheel...done.
# ve1/bin/pip install django-custom-user
Collecting django-custom-user
Using cached django_custom_user-0.5-py2.py3-none-any.whl
Collecting Django>=1.5 (from django-custom-user)
Using cached Django-1.9-py2.py3-none-any.whl
Installing collected packages: Django, django-custom-user
Successfully installed Django-1.9 django-custom-user-0.5
# ve1/bin/python
Python 2.7.10 (default, Jul 13 2015, 12:05:58)
[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from custom_user.migrations import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named migrations
>>>
# virtualenv ve2
New python executable in ve2/bin/python2.7
Also creating executable in ve2/bin/python
Installing setuptools, pip, wheel...done.
# ve2/bin/pip install https://github.com/peterlauri/django-custom-user/archive/master.zip
Collecting https://github.com/peterlauri/django-custom-user/archive/master.zip
Downloading https://github.com/peterlauri/django-custom-user/archive/master.zip
| 28kB 204kB/s
Collecting Django>=1.5 (from django-custom-user==0.5)
Using cached Django-1.9-py2.py3-none-any.whl
Installing collected packages: Django, django-custom-user
Running setup.py install for django-custom-user
Successfully installed Django-1.9 django-custom-user-0.5
# ve2/bin/python
Python 2.7.10 (default, Jul 13 2015, 12:05:58)
[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from custom_user.migrations import *
>>>
So this is why we had issues deploying a clean sql server, we got some error that django_admin_log couldn't be created due to a foreign key constraint. Fixed temporarily for now by doing pip install --upgrade https://github.com/peterlauri/django-custom-user/archive/master.zip
before running django migrate.
Let's hope the PR gets approved quickly and a new version is uploaded to
pypi.
On Tue, 29 Dec 2015 at 14:40, teuneboon notifications@github.com wrote:
So this is why we had issues deploying a clean sql server, we got some
error that django_admin_log couldn't be created due to a foreign key
constraint. Fixed temporarily for now by doing pip install --upgrade
https://github.com/peterlauri/django-custom-user/archive/master.zip
before running django migrate.—
Reply to this email directly or view it on GitHub
#28 (comment)
.
@teuneboon , you should probably use this one instead for now: https://github.com/peterlauri/django-custom-user/archive/0e52634332f269b57efc6f6681b6e5e9c152e761.zip, as I might play around in my fork :)
I'm running into this issue as well. The fix above worked for me in my dev environment.
I would really appreciate a fix for this for our production environment. Any news when pip will be updated? Can we do anything to help get this fixed faster?
I've released version 0.6 with migrations included @peterlauri @teuneboon @atogle @marnovdm