Unknown column 'snippets_snippet.owner_id' in' field list'

excuse me, I have a User serialization class. The model used in the class is set owner = models.ForeignKey ("auth.User", related_name="snippets") in the User,Snippet model. Performing database migration does not report an error, but there is no such field in the access URL prompt. It is said on the Internet that auth.User and User are the same, so User itself has a self-increasing id that will report an error. Because it is equivalent to inserting another id (but this id is self-increasing and exists by default)
has anyone encountered
clipboard.png

clipboard.png
models.py:
clipboard.png
serializer.py:

clipboard.png

?
Mar.02,2021
The owner in

UserSerializer should be in SnippetSerializer

Menu