Skip to content

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

Add missing migrations and fix failing tests (#17687)

Iga Karbowiak411da1495ade
diff --git a/saleor/checkout/migrations/0079_alter_checkoutline_prior_unit_price_amount_and_more.py b/saleor/checkout/migrations/0079_alter_checkoutline_prior_unit_price_amount_and_more.py
new file mode 100644
index 0000000000..ec4ef129e2
--- /dev/null
+++ b/saleor/checkout/migrations/0079_alter_checkoutline_prior_unit_price_amount_and_more.py
@@ -0,0 +1,28 @@
+# Generated by Django 4.2.20 on 2025-05-08 10:20
+
+from decimal import Decimal
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ ("checkout", "0078_merge_20250507_0613"),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name="checkoutline",
+ name="prior_unit_price_amount",
+ field=models.DecimalField(
+ blank=True, decimal_places=3, max_digits=20, null=True
+ ),
+ ),
+ migrations.AlterField(
+ model_name="checkoutline",
+ name="undiscounted_unit_price_amount",
+ field=models.DecimalField(
+ decimal_places=3, default=Decimal("0"), max_digits=20
+ ),
+ ),
+ ]
diff --git a/saleor/order/migrations/0202_alter_order_undiscounted_base_shipping_price_amount.py b/saleor/order/migrations/0202_alter_order_undiscounted_base_shipping_price_amount.py
new file mode 100644
index 0000000000..f86193ca61
--- /dev/null
+++ b/saleor/order/migrations/0202_alter_order_undiscounted_base_shipping_price_amount.py
@@ -0,0 +1,21 @@
+# Generated by Django 4.2.20 on 2025-05-08 10:20
+
+from decimal import Decimal
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ ("order", "0201_merge_20250507_0613"),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name="order",
+ name="undiscounted_base_shipping_price_amount",
+ field=models.DecimalField(
+ decimal_places=3, default=Decimal("0.0"), max_digits=20
+ ),
+ ),
+ ]
diff --git a/saleor/product/migrations/0199_alter_productvariantchannellisting_prior_price_amount.py b/saleor/product/migrations/0199_alter_productvariantchannellisting_prior_price_amount.py
new file mode 100644
index 0000000000..e5f4ed2957
--- /dev/null
+++ b/saleor/product/migrations/0199_alter_productvariantchannellisting_prior_price_amount.py
@@ -0,0 +1,19 @@
+# Generated by Django 4.2.20 on 2025-05-08 10:20
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ ("product", "0198_merge_20250507_0613"),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name="productvariantchannellisting",
+ name="prior_price_amount",
+ field=models.DecimalField(
+ blank=True, decimal_places=3, max_digits=20, null=True
+ ),
+ ),
+ ]
diff --git a/saleor/webhook/tests/response_schemas/test_taxes.py b/saleor/webhook/tests/response_schemas/test_taxes.py
index d7a680c831..6045f903bc 100644
--- a/saleor/webhook/tests/response_schemas/test_taxes.py
+++ b/saleor/webhook/tests/response_schemas/test_taxes.py
@@ -82,14 +82,14 @@ def test_line_calculate_taxes_schema_valid(data):
# Invalid total_gross_amount (greater than MAXIMUM_PRICE)
{
"tax_rate": Decimal("20.00"),
- "total_gross_amount": 100000000000,
+ "total_gross_amount": 100000000000000000000,
"total_net_amount": Decimal("80.00"),
},
# Invalid total_net_amount (greater than MAXIMUM_PRICE)
{
"tax_rate": Decimal("20.00"),
"total_gross_amount": Decimal("100.00"),
- "total_net_amount": Decimal("10000000000"),
+ "total_net_amount": Decimal("100000000000000000000"),
},
],
)