]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
migrations: Mark '0016_series_project' as non-atomic
authorStephen Finucane <stephen@that.guru>
Tue, 13 Jun 2017 09:12:36 +0000 (10:12 +0100)
committerStephen Finucane <stephen@that.guru>
Wed, 14 Jun 2017 08:34:26 +0000 (09:34 +0100)
This should resolve migration issues arising from PostgreSQL's inability
to mix data and schema migrations in a single transaction.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Acked-by: Aaron Conole <aconole@bytheb.org>
Closes-bug: #104

patchwork/migrations/0016_series_project.py

index c4874f9733066593cdf46ed94a634f0c5694c715..7aea1325d203fa4feba8552ab55b269fc9e619a0 100644 (file)
@@ -32,6 +32,12 @@ def reverse(apps, schema_editor):
 
 class Migration(migrations.Migration):
 
+    # This is necessary due to a mistake made when writing the migration.
+    # PostgreSQL does not allow mixing of schema and data migrations within the
+    # same transaction. Disabling transactions ensures this doesn't happen.
+    # Refer to bug #104 for more information.
+    atomic = False
+
     dependencies = [
         ('patchwork', '0015_add_series_models'),
     ]