Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fix migrations dependencies and revert options (#14537)

Iga Karbowiak06f23b3eb7cf
diff --git a/saleor/discount/migrations/0065_remove_voucher_code_index.py b/saleor/discount/migrations/0065_remove_voucher_code_index.py
index b8f484221a..d40cb15651 100644
--- a/saleor/discount/migrations/0065_remove_voucher_code_index.py
+++ b/saleor/discount/migrations/0065_remove_voucher_code_index.py
@@ -12,6 +12,7 @@ class Migration(migrations.Migration):
migrations.RunSQL(
"""
DROP INDEX CONCURRENTLY IF EXISTS discount_voucher_code_ff8dc52c_like;
- """
+ """,
+ reverse_sql=migrations.RunSQL.noop,
)
]
diff --git a/saleor/discount/migrations/0067_voucher_single_use.py b/saleor/discount/migrations/0067_voucher_single_use.py
index 4d24b272dc..6ef0418c2d 100644
--- a/saleor/discount/migrations/0067_voucher_single_use.py
+++ b/saleor/discount/migrations/0067_voucher_single_use.py
@@ -19,6 +19,7 @@ class Migration(migrations.Migration):
ALTER TABLE discount_voucher
ALTER COLUMN single_use
SET DEFAULT false;
- """
+ """,
+ reverse_sql=migrations.RunSQL.noop,
),
]
diff --git a/saleor/product/migrations/0187_auto_20230614_0838.py b/saleor/product/migrations/0187_auto_20230614_0838.py
index 5237f5d571..3b7ae4c307 100644
--- a/saleor/product/migrations/0187_auto_20230614_0838.py
+++ b/saleor/product/migrations/0187_auto_20230614_0838.py
@@ -9,6 +9,11 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("product", "0186_remove_product_charge_taxes"),
+ ("discount", "0045_promotions"),
+ ]
+
+ run_before = [
+ ("discount", "0047_migrate_sales_to_promotions"),
]
operations = [