Changes between Initial Version and Version 1 of Ticket #28000


Ignore:
Timestamp:
Mar 31, 2017, 5:48:36 AM (8 years ago)
Author:
Matteo Pietro Russo
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28000 – Description

    initial v1  
    11If i consider to modify a column (ChaField) to add a default value as follow:
    2 
     2{{{
    33from django.db import models
    44
    55class PersonModel(models.Model):
    66    nickname = models.CharField(default="noname", max_length=100, null=False)
    7 
     7}}}
    88makemigration insists on creating a new migration for this change. However, the migration on MYSQL shows:
    9 
     9{{{
    1010BEGIN;
    1111ALTER TABLE "core_personmodel" ALTER "nickname" SET DEFAULT 'noname';
    1212ALTER TABLE "core_personmodel" ALTER "nickname" DROP DEFAULT;
    1313COMMIT;
    14 
     14}}}
    1515I think there is a mistake at line 735 in django/db/backends/base/schema.py
    1616{{{
Back to Top