diff options
author | Stephen Finucane <stephen@that.guru> | 2017-05-19 15:53:18 +0100 |
---|---|---|
committer | Stephen Finucane <stephen@that.guru> | 2017-12-03 20:54:35 +0000 |
commit | 4baf00b69be1b1160dff2f18a8b7e0764b1d2613 (patch) | |
tree | 1200ea9e783e206f0959c05bed6c6acee1fc4e07 | |
parent | 636276eba009ff524ea1096d730a5a0d21859a8e (diff) | |
download | patchwork-4baf00b69be1b1160dff2f18a8b7e0764b1d2613.tar patchwork-4baf00b69be1b1160dff2f18a8b7e0764b1d2613.tar.gz |
migrations: Mark 'RunPython' blocks as non-atomic
This appears to be required to run migrations on MySQL backend. Without
this, the following error messages are propagated:
Executing DDL statements while in a transaction on databases that
can't perform a rollback is prohibited.
Signed-off-by: Stephen Finucane <stephen@that.guru>
Tested-by: Daniel Axtens <dja@axtens.net>
-rw-r--r-- | patchwork/migrations/0007_move_comment_content_to_patch_content.py | 6 | ||||
-rw-r--r-- | patchwork/migrations/0016_series_project.py | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/patchwork/migrations/0007_move_comment_content_to_patch_content.py b/patchwork/migrations/0007_move_comment_content_to_patch_content.py index 43c135e..f6ad057 100644 --- a/patchwork/migrations/0007_move_comment_content_to_patch_content.py +++ b/patchwork/migrations/0007_move_comment_content_to_patch_content.py @@ -91,6 +91,8 @@ class Migration(migrations.Migration): ] operations = [ - migrations.RunPython(copy_comment_field, uncopy_comment_field), - migrations.RunPython(remove_duplicate_comments, recreate_comments), + migrations.RunPython(copy_comment_field, uncopy_comment_field, + atomic=False), + migrations.RunPython(remove_duplicate_comments, recreate_comments, + atomic=False), ] diff --git a/patchwork/migrations/0016_series_project.py b/patchwork/migrations/0016_series_project.py index 7aea132..f298b12 100644 --- a/patchwork/migrations/0016_series_project.py +++ b/patchwork/migrations/0016_series_project.py @@ -48,7 +48,7 @@ class Migration(migrations.Migration): name='project', field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='series', to='patchwork.Project'), ), - migrations.RunPython(forward, reverse), + migrations.RunPython(forward, reverse, atomic=False), migrations.AlterField( model_name='seriesreference', name='msgid', |