Just realized the subject was wrong, it should be *makemigrations , not makemigrate*
On Sunday, December 21, 2014 8:36:29 PM UTC+1, pjotr wrote: > > Hi, > > I have a django model that I just added six new fields to. I ran > *makemigrations > *and after that noticed when we ran our rehearsal upgrade with dump of > the production database that things took longer than we expected, and > checked the processlist. We saw that there were six *alter table* > statements that was executed after each other, each taking around 15 > minutes to run. > > My expectations were that the migration framework would optimise this and > only execute one alter table statement. But obviously it was not. Or is > there a bug? :) > > Are there anyway to fix this, without having to change the migration and > perform the alter table statement with pure SQL? > > DB: MySQL > Django 1.7.1 > > The migrations generated were six of these (only showing one to reduce > post size): > > migrations.AddField( > model_name='mymodel', > name='field_a', > field=models.BigIntegerField(help_text=b'Blablabla', null=True, > db_index=True), > preserve_default=True, > ), > > > Regards, Peter Lauri > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c6a523ee-07b8-4a50-8e3b-55ed623e5663%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

