Tzach
Tzach

Reputation: 13396

Django 1.7 long migrations never ends

I'm using django 1.7 with a MySQL DB. I'm trying to run a migration that deletes a column from a table with 500K rows. When running the migration it hangs for an infinite amount of time.

When manually connecting to the DB, I can see that the migration worked (the column has been deleted). However the migration was not written to django_migrations table. When looking at DB performance graphs, I see the spike made by the migration, and then back to normal levels.

What might be the cause for the hang? Am I missing something?

Update: here is the migration code

class Migration(migrations.Migration):
    operations = [
        migrations.RemoveField(
            model_name='table_name',
            name='column_name',
        ),
    ]

Upvotes: 1

Views: 200

Answers (1)

mrcrgl
mrcrgl

Reputation: 640

this seems not to be the desired behavior. Please point this to the Django-users mailing list: https://groups.google.com/forum/#!forum/django-users

Or open a ticket at: https://code.djangoproject.com/query

Django 1.7 is freshly released and I know that the migrations are one of the most complicated changes they've made in this release.

Sorry that I can't help you immediately.

Cheers

Upvotes: 2

Related Questions