rest_framework.authtoken app migration unsucessful with custom migration

118 views
Skip to first unread message

Bipin Raut

unread,
Nov 1, 2015, 9:48:44 PM11/1/15
to Django REST framework
I have custom User model  with db_table=u"users". Setting file have also been update with AUTH_USER_MODEL= 'users.User'. While checking the database i found that  the  users table exist with users data. But, while migrating the rest_framework.authtoken app it gives me DATABASE ERROR: Relation users_user doesn't exist.
 If someone can point me my error what would be very helpful. Thanks in advance.

Xavier Ordoquy

unread,
Nov 2, 2015, 2:16:24 AM11/2/15
to django-res...@googlegroups.com
Hi,

Custom user must be set at the start of a project with Django.
If that’s not the case, intermediate tables will be linked to the former user table. Note that auth token will not be the only table impacted. django auth groups will only be let alone other third parties.
You likely need  to drop your database and recreate it or perform a custom to recreate the intermediate tables to your new user table.

Regards,
Xavier,
Linovia.

Le 2 nov. 2015 à 03:48, Bipin Raut <bipin...@gmail.com> a écrit :

I have custom User model  with db_table=u"users". Setting file have also been update with AUTH_USER_MODEL= 'users.User'. While checking the database i found that  the  users table exist with users data. But, while migrating the rest_framework.authtoken app it gives me DATABASE ERROR: Relation users_user doesn't exist.
 If someone can point me my error what would be very helpful. Thanks in advance.

--
You received this message because you are subscribed to the Google Groups "Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-fram...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages