Opened 9 years ago

Last modified 4 years ago

#25012 closed Bug

Migration doesn't seem to detect foreignKey type changes — at Version 1

Reported by: Hedde van der Heide Owned by: nobody
Component: Migrations Version: dev
Severity: Normal Keywords: migrations
Cc: Tyson Clugg, Samuel Bishop Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Hedde van der Heide)

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.

Change History (1)

comment:1 by Hedde van der Heide, 9 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top