Opened 10 years ago
Last modified 4 years ago
#25012 closed Bug
Migration doesn't seem to detect foreignKey type changes — at Version 2
Description (last modified by ) ¶
Example:
class Foo(models.Model): id = models.AutoField() # Now change this to models.CharField(primary_key=True, max_length=...) and migrate, the migration doesn't complain class Bar(object): foo = models.ForeignKey(Foo) # but Postgres will still say Bar.foo is an Integer value.
DataError at /myapp/bar/add/
invalid input syntax for integer: "TEST"
LINE 1: ...d") VALUES (NULL, 'TEST', ...
Change History (2)
comment:1 by , 10 years ago
Description: | modified (diff) |
---|
comment:2 by , 10 years ago
Description: | modified (diff) |
---|
Note:
See TracTickets
for help on using tickets.