Modify

Ticket #432 (closed defect: wontfix)

Opened 4 years ago

Last modified 4 years ago

schemamigration cannot automatically detect the change of default value.

Reported by: fcamel@… Owned by: andrew
Priority: major Milestone: 0.7.1
Component: commands Version: 0.7
Keywords: Cc:

Description

My server information:

  • Ubuntu 8.04

models.py:

class Name(models.Model):
    n = models.IntegerField(default=400)

After changing the default value, "./manage.py schemamigration my_app change_default --auto" responses "Nothing seems to have changed."

I've tried this for both sqlite3 and MySQL 5.0.51a

Attachments

Change History

comment:1 Changed 4 years ago by andrew

  • Status changed from new to closed
  • Resolution set to wontfix
  • Milestone set to 0.7.1

This is entirely correct behaviour; Django doesn't store defaults in the database, so changing the default doesn't induce a schema migration.

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.