Opened 6 years ago

Closed 6 years ago

#29674 closed Bug (needsinfo)

Error with ForeignKey model, after add this model

Reported by: Rixkz Owned by: nobody
Component: Migrations Version: 2.1
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When i config model file and do some migration, so if first time I do created model with CharField, TextField (it’s dosen’t matter what models you’ve created) and “ForeignKey”, it’s fine if I had create my model by this order and do some makemigrations and migrate it’s work well.
When I’ve created model CharField and TextField (without ForeignKey model) and do migrations it will pass BUT!! If I need to put models “ForeignKey” to my model class I can pass with makemigrations step but it’s error on migrate command output the error is ValueError: invalid literal for int() with base 10: 'auth.User'

Attachments (1)

bug.txt (3.8 KB ) - added by Rixkz 6 years ago.

Download all attachments as: .zip

Change History (3)

by Rixkz, 6 years ago

Attachment: bug.txt added

comment:1 by Zach Bresser, 6 years ago

Can you post your models.py?

comment:2 by Tim Graham, 6 years ago

Component: UncategorizedMigrations
Resolution: needsinfo
Status: newclosed

As Zach said, we need specific steps to reproduce, perhaps even a sample app with migrations that reproduces the issue. It's impossible to tell from the report how to reproduce the problem to determine if it's a bug in Django or a mistake in your project.

Note: See TracTickets for help on using tickets.
Back to Top