managed=False ignored by migrate

124 views
Skip to first unread message

Drew Ferguson

unread,
Apr 17, 2015, 8:52:20 AM4/17/15
to django...@googlegroups.com
Hi

Trying to use a legacy database with Django
1.8 (specifically Django-1.8-py2.py3-none-any.whl with python2.7)

I followed the steps in
https://docs.djangoproject.com/en/1.8/howto/legacy-databases/

i.e. "python manage.py inspectdb" and tidyup the resulting models file

However when I run "python manage.py migrate" it insists on trying to
create one of the tables; since the table already exists, it crashes
leaving the django tables incorrectly built so I cannot start
django at all i.e. "django_session" does not exist

In a previous iteration I had django running fine but it always wanted an
"id" field to exist in tables even though there was another field had
"primary_key=True" set

Is there some trick I am missing or maybe I should not be using 1.8 just
yet

--
Drew Ferguson

Drew Ferguson

unread,
Apr 17, 2015, 9:29:25 AM4/17/15
to django...@googlegroups.com
Erk!

My own fault unfortunately, apologies for the noise

Some files had gotten left in a migration folder in an app; causing all
sorts of confusion evidently

All well now...
AFC Commercial
http://www.afccommercial.co.uk
Reply all
Reply to author
Forward
0 new messages