{"id":833287,"url":"http://patchwork.ozlabs.org/api/1.2/patches/833287/?format=json","web_url":"http://patchwork.ozlabs.org/project/patchwork/patch/20171102102844.18931-6-stephen@that.guru/","project":{"id":16,"url":"http://patchwork.ozlabs.org/api/1.2/projects/16/?format=json","name":"Patchwork","link_name":"patchwork","list_id":"patchwork.lists.ozlabs.org","list_email":"patchwork@lists.ozlabs.org","web_url":"http://jk.ozlabs.org/projects/patchwork/","scm_url":"git://github.com/getpatchwork/patchwork","webscm_url":"https://github.com/getpatchwork/patchwork","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20171102102844.18931-6-stephen@that.guru>","list_archive_url":null,"date":"2017-11-02T10:28:40","name":"[v2,5/9] migrations: Mark 'RunPython' blocks as non-atomic","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"9f883fa58fcc16446313cdba15671edd5b794f6a","submitter":{"id":69991,"url":"http://patchwork.ozlabs.org/api/1.2/people/69991/?format=json","name":"Stephen Finucane","email":"stephen@that.guru"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/patchwork/patch/20171102102844.18931-6-stephen@that.guru/mbox/","series":[{"id":11467,"url":"http://patchwork.ozlabs.org/api/1.2/series/11467/?format=json","web_url":"http://patchwork.ozlabs.org/project/patchwork/list/?series=11467","date":"2017-11-02T10:28:35","name":"Add support for Django 1.11","version":2,"mbox":"http://patchwork.ozlabs.org/series/11467/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/833287/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/833287/checks/","tags":{},"related":[],"headers":{"Return-Path":"<patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>","X-Original-To":["incoming@patchwork.ozlabs.org","patchwork@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","patchwork@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3ySM8766Bbz9t30\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  2 Nov 2017 21:41:27 +1100 (AEDT)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3ySM873fNSzDr6C\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  2 Nov 2017 21:41:27 +1100 (AEDT)","from poodle.birch.relay.mailchannels.net\n\t(poodle.birch.relay.mailchannels.net [23.83.209.249])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3ySM4B66yCzDr8d\n\tfor <patchwork@lists.ozlabs.org>;\n\tThu,  2 Nov 2017 21:38:02 +1100 (AEDT)","from relay.mailchannels.net (localhost [127.0.0.1])\n\tby relay.mailchannels.net (Postfix) with ESMTP id EF4DD5C1B51\n\tfor <patchwork@lists.ozlabs.org>;\n\tThu,  2 Nov 2017 10:29:06 +0000 (UTC)","from one.mxroute.com (unknown [100.96.127.30])\n\t(Authenticated sender: mxroute)\n\tby relay.mailchannels.net (Postfix) with ESMTPA id 79E3D5C1BCC\n\tfor <patchwork@lists.ozlabs.org>;\n\tThu,  2 Nov 2017 10:29:06 +0000 (UTC)","from one.mxroute.com (one-outgoing.mxroute.com [172.20.103.208])\n\t(using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384)\n\tby 0.0.0.0:2500 (trex/5.9.14); Thu, 02 Nov 2017 10:29:06 +0000"],"Authentication-Results":["ozlabs.org;\n\tdkim=fail reason=\"key not found in DNS\" (0-bit key;\n\tunprotected) header.d=that.guru header.i=@that.guru\n\theader.b=\"nZYwf9RB\"; dkim-atps=neutral","lists.ozlabs.org;\n\tdkim=fail reason=\"key not found in DNS\" (0-bit key;\n\tunprotected) header.d=that.guru header.i=@that.guru\n\theader.b=\"nZYwf9RB\"; dkim-atps=neutral","ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=that.guru\n\t(client-ip=23.83.209.249; helo=poodle.birch.relay.mailchannels.net;\n\tenvelope-from=stephen@that.guru; receiver=<UNKNOWN>)","lists.ozlabs.org;\n\tdkim=fail reason=\"key not found in DNS\" (0-bit key;\n\tunprotected) header.d=that.guru header.i=@that.guru\n\theader.b=\"nZYwf9RB\"; dkim-atps=neutral"],"X-Sender-Id":["mxroute|x-authuser|stephen@that.guru","mxroute|x-authuser|stephen@that.guru"],"X-MC-Relay":"Neutral","X-MailChannels-SenderId":"mxroute|x-authuser|stephen@that.guru","X-MailChannels-Auth-Id":"mxroute","X-Imminent-Broad":"2e9ef8a71ac3c37e_1509618546844_2742344547","X-MC-Loop-Signature":"1509618546844:2121995150","X-MC-Ingress-Time":"1509618546843","DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=that.guru;\n\ts=default;\n\th=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:\n\tSender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:\n\tContent-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:\n\tResent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:\n\tList-Subscribe:List-Post:List-Owner:List-Archive;\n\tbh=IISONojO1BmbF/YRd5yVDYsstS8RE9TsfJQCgBue+Os=;\n\tb=nZYwf9RBhzg1h1El1UCtPN6Z1r\n\t5029OEHoly7xkvHTOdIeLGTssnJY9/TIn2GahxuE7BhBkwYUu6PMX9o/hqgPv6hCZJutW9VPcqpjx\n\tpadAHwozOhRsolE+a1hJSkhhoi8NdMocA7sPX+Htv2wE++gCUDDUBHaDDh2je0F++8PRQlCnSMkcc\n\tcuQMro3XKywUoBVquAQ/hsaTJnoPvfobmTrhnj7UQzyFS8eTx9NpCiFuhba/rERZnA9If4Ey8QKo7\n\t7EiZZgS7SMbfPihfDpHewLwG5lf8B4Q3rPGxSJh9AO5vwd0iSdYZqyPE896/nPk2o6Rjaq4or8Og1\n\tpyYtWUDg==;","From":"Stephen Finucane <stephen@that.guru>","To":"patchwork@lists.ozlabs.org","Subject":"[PATCH v2 5/9] migrations: Mark 'RunPython' blocks as non-atomic","Date":"Thu,  2 Nov 2017 10:28:40 +0000","Message-Id":"<20171102102844.18931-6-stephen@that.guru>","X-Mailer":"git-send-email 2.13.6","In-Reply-To":"<20171102102844.18931-1-stephen@that.guru>","References":"<20171102102844.18931-1-stephen@that.guru>","X-AuthUser":"stephen@that.guru","X-BeenThere":"patchwork@lists.ozlabs.org","X-Mailman-Version":"2.1.24","Precedence":"list","List-Id":"Patchwork development <patchwork.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/patchwork>,\n\t<mailto:patchwork-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/patchwork/>","List-Post":"<mailto:patchwork@lists.ozlabs.org>","List-Help":"<mailto:patchwork-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/patchwork>,\n\t<mailto:patchwork-request@lists.ozlabs.org?subject=subscribe>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org","Sender":"\"Patchwork\"\n\t<patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>"},"content":"This appears to be required to run migrations on MySQL backend. Without\nthis, the following error messages are propagated:\n\n    Executing DDL statements while in a transaction on databases that\n    can't perform a rollback is prohibited.\n\nSigned-off-by: Stephen Finucane <stephen@that.guru>\n---\n patchwork/migrations/0007_move_comment_content_to_patch_content.py | 6 ++++--\n patchwork/migrations/0016_series_project.py                        | 2 +-\n 2 files changed, 5 insertions(+), 3 deletions(-)","diff":"diff --git a/patchwork/migrations/0007_move_comment_content_to_patch_content.py b/patchwork/migrations/0007_move_comment_content_to_patch_content.py\nindex 43c135ea..f6ad0576 100644\n--- a/patchwork/migrations/0007_move_comment_content_to_patch_content.py\n+++ b/patchwork/migrations/0007_move_comment_content_to_patch_content.py\n@@ -91,6 +91,8 @@ class Migration(migrations.Migration):\n     ]\n \n     operations = [\n-        migrations.RunPython(copy_comment_field, uncopy_comment_field),\n-        migrations.RunPython(remove_duplicate_comments, recreate_comments),\n+        migrations.RunPython(copy_comment_field, uncopy_comment_field,\n+                             atomic=False),\n+        migrations.RunPython(remove_duplicate_comments, recreate_comments,\n+                             atomic=False),\n     ]\ndiff --git a/patchwork/migrations/0016_series_project.py b/patchwork/migrations/0016_series_project.py\nindex 7aea1325..f298b125 100644\n--- a/patchwork/migrations/0016_series_project.py\n+++ b/patchwork/migrations/0016_series_project.py\n@@ -48,7 +48,7 @@ class Migration(migrations.Migration):\n             name='project',\n             field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='series', to='patchwork.Project'),\n         ),\n-        migrations.RunPython(forward, reverse),\n+        migrations.RunPython(forward, reverse, atomic=False),\n         migrations.AlterField(\n             model_name='seriesreference',\n             name='msgid',\n","prefixes":["v2","5/9"]}