Changes between Initial Version and Version 1 of Ticket #28000
- Timestamp:
- Mar 31, 2017, 5:48:36 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #28000 – Description
initial v1 1 1 If i consider to modify a column (ChaField) to add a default value as follow: 2 2 {{{ 3 3 from django.db import models 4 4 5 5 class PersonModel(models.Model): 6 6 nickname = models.CharField(default="noname", max_length=100, null=False) 7 7 }}} 8 8 makemigration insists on creating a new migration for this change. However, the migration on MYSQL shows: 9 9 {{{ 10 10 BEGIN; 11 11 ALTER TABLE "core_personmodel" ALTER "nickname" SET DEFAULT 'noname'; 12 12 ALTER TABLE "core_personmodel" ALTER "nickname" DROP DEFAULT; 13 13 COMMIT; 14 14 }}} 15 15 I think there is a mistake at line 735 in django/db/backends/base/schema.py 16 16 {{{