Hey John,

Agree with James. makemigrations command doesn't create models.py file - 
it's on your plate. But after creating models.py file and filling it with 
your models - you have to create migration file with makemigrations command 
and run migrate one to create all required tables, fk, etc.

- Dmitry

On Friday, September 11, 2015 at 10:42:03 PM UTC+3, John Emmatty wrote:
>
> I ran makemigrations against my legacy, MySQL database and it created 
> models.py file for me, I copied the file to my applications package 
> directory and ran makemigrations again after adding a table to extend the 
> default users table. Now makemigrations is throwing following errors . I 
> created a fresh django project which had no reference to older versions.
>
> SystemCheckError: System check identified some issues:
>
>     ERRORS:
>     djangogettrix.AuthGroupPermissions: (models.E012) 'unique_together' 
> refers to the non-existent field 'group_id'.
>     djangogettrix.AuthGroupPermissions: (models.E012) 'unique_together' 
> refers to the non-existent field 'permission_id'.
>     djangogettrix.AuthPermission: (models.E012) 'unique_together' refers 
> to the non-existent field 'content_type_id'.
>     djangogettrix.AuthUserGroups: (models.E012) 'unique_together' refers 
> to the non-existent field 'group_id'.
>     djangogettrix.AuthUserGroups: (models.E012) 'unique_together' refers 
> to the non-existent field 'user_id'.
>     djangogettrix.AuthUserUserPermissions: (models.E012) 'unique_together' 
> refers to the non-existent field 'permission_id'.
>     djangogettrix.AuthUserUserPermissions: (models.E012) 'unique_together' 
> refers to the non-existent field 'user_id'.
>     djangogettrix.RolesUsers: (models.E012) 'unique_together' refers to 
> the non-existent field 'role_id'.
>     djangogettrix.RolesUsers: (models.E012) 'unique_together' refers to 
> the non-existent field 'user_id'.
>
> Kindly help me by throwing some light on this.
>

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6dc83113-677e-4499-b3df-2b12a1efae1d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to