Opened 9 years ago

Closed 9 years ago

#24790 closed Bug (duplicate)

Migrations remove / add field after rename it

Reported by: Daniel Owned by: nobody
Component: Migrations Version: 1.8
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 (last modified by Tim Graham)

When I change a model from:

class MyModel(models.Model):
    my_name = models.CharField(max_length=100)

to:

class MyModel(models.Model):
    name = models.CharField(max_length=100, db_column='my_name')

migrations removes 'my_name' and adds 'name'.

Change History (1)

comment:1 by Tim Graham, 9 years ago

Description: modified (diff)
Resolution: duplicate
Status: newclosed

Duplicate of #24260

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