From 74704a7c1ef7a566a5850e88edbc7724510f4876 Mon Sep 17 00:00:00 2001
From: Oliver Walters <oliver.henry.walters@gmail.com>
Date: Thu, 4 Feb 2021 22:19:15 +1100
Subject: [PATCH] Mark migrations with data operations "non atomic"

Ref: https://docs.djangoproject.com/en/dev/howto/writing-migrations/#non-atomic-migrations
---
 InvenTree/build/migrations/0013_auto_20200425_0507.py           | 2 ++
 InvenTree/build/migrations/0018_build_reference.py              | 2 ++
 InvenTree/company/migrations/0019_auto_20200413_0642.py         | 2 ++
 .../company/migrations/0024_unique_name_email_constraint.py     | 2 ++
 InvenTree/company/migrations/0026_auto_20201110_1011.py         | 2 ++
 InvenTree/part/migrations/0020_auto_20190908_0404.py            | 2 ++
 InvenTree/part/migrations/0034_auto_20200404_1238.py            | 2 ++
 InvenTree/part/migrations/0039_auto_20200515_1127.py            | 2 ++
 InvenTree/part/migrations/0056_auto_20201110_1125.py            | 2 ++
 InvenTree/stock/migrations/0012_auto_20190908_0405.py           | 2 ++
 InvenTree/stock/migrations/0022_auto_20200217_1109.py           | 2 ++
 11 files changed, 22 insertions(+)

diff --git a/InvenTree/build/migrations/0013_auto_20200425_0507.py b/InvenTree/build/migrations/0013_auto_20200425_0507.py
index d960e416c8..9a9eba06e2 100644
--- a/InvenTree/build/migrations/0013_auto_20200425_0507.py
+++ b/InvenTree/build/migrations/0013_auto_20200425_0507.py
@@ -17,6 +17,8 @@ def nupdate_tree(apps, schema_editor):
 
 class Migration(migrations.Migration):
 
+    atomic = False
+
     dependencies = [
         ('build', '0012_build_sales_order'),
     ]
diff --git a/InvenTree/build/migrations/0018_build_reference.py b/InvenTree/build/migrations/0018_build_reference.py
index e8fd938b6a..be4f7da36f 100644
--- a/InvenTree/build/migrations/0018_build_reference.py
+++ b/InvenTree/build/migrations/0018_build_reference.py
@@ -31,6 +31,8 @@ def reverse_default_reference(apps, schema_editor):
 
 class Migration(migrations.Migration):
 
+    atomic = False
+
     dependencies = [
         ('build', '0017_auto_20200426_0612'),
     ]
diff --git a/InvenTree/company/migrations/0019_auto_20200413_0642.py b/InvenTree/company/migrations/0019_auto_20200413_0642.py
index 8a7f3d5945..2468b864c2 100644
--- a/InvenTree/company/migrations/0019_auto_20200413_0642.py
+++ b/InvenTree/company/migrations/0019_auto_20200413_0642.py
@@ -354,6 +354,8 @@ def associate_manufacturers(apps, schema_editor):
 
 class Migration(migrations.Migration):
 
+    atomic = False
+
     dependencies = [
         ('company', '0018_supplierpart_manufacturer'),
     ]
diff --git a/InvenTree/company/migrations/0024_unique_name_email_constraint.py b/InvenTree/company/migrations/0024_unique_name_email_constraint.py
index e6d1fd93dd..b0fd88e780 100644
--- a/InvenTree/company/migrations/0024_unique_name_email_constraint.py
+++ b/InvenTree/company/migrations/0024_unique_name_email_constraint.py
@@ -19,6 +19,8 @@ def make_empty_email_field_null(apps, schema_editor):
 
 class Migration(migrations.Migration):
 
+    atomic = False
+
     dependencies = [
         ('company', '0023_auto_20200808_0715'),
     ]
diff --git a/InvenTree/company/migrations/0026_auto_20201110_1011.py b/InvenTree/company/migrations/0026_auto_20201110_1011.py
index 553eced0fc..c6be37b967 100644
--- a/InvenTree/company/migrations/0026_auto_20201110_1011.py
+++ b/InvenTree/company/migrations/0026_auto_20201110_1011.py
@@ -138,6 +138,8 @@ def reverse_currencies(apps, schema_editor):
 
 class Migration(migrations.Migration):
 
+    atomic = False
+
     dependencies = [
         ('company', '0025_auto_20201110_1001'),
     ]
diff --git a/InvenTree/part/migrations/0020_auto_20190908_0404.py b/InvenTree/part/migrations/0020_auto_20190908_0404.py
index 4f27191099..7766ba38f9 100644
--- a/InvenTree/part/migrations/0020_auto_20190908_0404.py
+++ b/InvenTree/part/migrations/0020_auto_20190908_0404.py
@@ -12,6 +12,8 @@ def update_tree(apps, schema_editor):
 
 class Migration(migrations.Migration):
 
+    atomic = False
+
     dependencies = [
         ('part', '0019_auto_20190908_0404'),
     ]
diff --git a/InvenTree/part/migrations/0034_auto_20200404_1238.py b/InvenTree/part/migrations/0034_auto_20200404_1238.py
index afd463d30d..3868191c02 100644
--- a/InvenTree/part/migrations/0034_auto_20200404_1238.py
+++ b/InvenTree/part/migrations/0034_auto_20200404_1238.py
@@ -18,6 +18,8 @@ def create_thumbnails(apps, schema_editor):
 
 class Migration(migrations.Migration):
 
+    atomic = False
+
     dependencies = [
         ('part', '0033_auto_20200404_0445'),
     ]
diff --git a/InvenTree/part/migrations/0039_auto_20200515_1127.py b/InvenTree/part/migrations/0039_auto_20200515_1127.py
index bc25097888..a95775f6a0 100644
--- a/InvenTree/part/migrations/0039_auto_20200515_1127.py
+++ b/InvenTree/part/migrations/0039_auto_20200515_1127.py
@@ -16,6 +16,8 @@ def nupdate_tree(apps, schema_editor):
 
 class Migration(migrations.Migration):
 
+    atomic = False
+
     dependencies = [
         ('part', '0038_auto_20200513_0016'),
     ]
diff --git a/InvenTree/part/migrations/0056_auto_20201110_1125.py b/InvenTree/part/migrations/0056_auto_20201110_1125.py
index 13a512bdd0..b382dded71 100644
--- a/InvenTree/part/migrations/0056_auto_20201110_1125.py
+++ b/InvenTree/part/migrations/0056_auto_20201110_1125.py
@@ -138,6 +138,8 @@ def reverse_currencies(apps, schema_editor):
 
 class Migration(migrations.Migration):
 
+    atomic = False
+
     dependencies = [
         ('part', '0055_auto_20201110_1001'),
     ]
diff --git a/InvenTree/stock/migrations/0012_auto_20190908_0405.py b/InvenTree/stock/migrations/0012_auto_20190908_0405.py
index 52071e5cd4..5f52e75093 100644
--- a/InvenTree/stock/migrations/0012_auto_20190908_0405.py
+++ b/InvenTree/stock/migrations/0012_auto_20190908_0405.py
@@ -13,6 +13,8 @@ def update_tree(apps, schema_editor):
 
 class Migration(migrations.Migration):
 
+    atomic = False
+
     dependencies = [
         ('stock', '0011_auto_20190908_0404'),
     ]
diff --git a/InvenTree/stock/migrations/0022_auto_20200217_1109.py b/InvenTree/stock/migrations/0022_auto_20200217_1109.py
index 0db3985361..f86fd51691 100644
--- a/InvenTree/stock/migrations/0022_auto_20200217_1109.py
+++ b/InvenTree/stock/migrations/0022_auto_20200217_1109.py
@@ -12,6 +12,8 @@ def update_stock_item_tree(apps, schema_editor):
 
 class Migration(migrations.Migration):
 
+    atomic = False
+
     dependencies = [
         ('stock', '0021_auto_20200215_2232'),
     ]