Both seems to be generating integer NOT NULL UNIQUE REFERENCES databaase columns.
Edit: My question is only about at the database level. (Not in the Django ORM.)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
ForeignKeyfields should be used for 1 to n relationships andOneToOneFieldshould be used to 1 to 1 relationships.On database level, the foreign key is unique for OneToOneFields and that’s not the case for ForeignKeys.