Opened 10 years ago

Last modified 4 years ago

#25012 closed Bug

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

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

Example:

Code highlighting:

class Foo(models.Model):
    id = models.AutoField()  # Now change this to models.CharField(primary_key=True) 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 (0)

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