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)
Change History (3)
by , 6 years ago
comment:1 by , 6 years ago
comment:2 by , 6 years ago
Component: | Uncategorized → Migrations |
---|---|
Resolution: | → needsinfo |
Status: | new → closed |
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.
Can you post your models.py?