Skip to content

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

Add new schema and migration

fowczarekba0731e1322c
diff --git a/saleor/discount/migrations/0015_voucher_min_quantity_of_products.py b/saleor/discount/migrations/0015_voucher_min_quantity_of_products.py
new file mode 100644
index 0000000000..b97e782982
--- /dev/null
+++ b/saleor/discount/migrations/0015_voucher_min_quantity_of_products.py
@@ -0,0 +1,16 @@
+# Generated by Django 2.2.3 on 2019-07-04 08:40
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [("discount", "0014_auto_20190701_0402")]
+
+ operations = [
+ migrations.AddField(
+ model_name="voucher",
+ name="min_quantity_of_products",
+ field=models.PositiveIntegerField(blank=True, null=True),
+ )
+ ]
diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphql
index 3ca772d337..5da99f3bac 100644
--- a/saleor/graphql/schema.graphql
+++ b/saleor/graphql/schema.graphql
@@ -3131,6 +3131,7 @@ type Voucher implements Node {
discountValueType: DiscountValueTypeEnum!
discountValue: Float!
minAmountSpent: Money
+ minQuantityOfProducts: Int
categories(before: String, after: String, first: Int, last: Int): CategoryCountableConnection
collections(before: String, after: String, first: Int, last: Int): CollectionCountableConnection
products(before: String, after: String, first: Int, last: Int): ProductCountableConnection
@@ -3195,6 +3196,7 @@ input VoucherInput {
collections: [ID]
categories: [ID]
minAmountSpent: Decimal
+ minQuantityOfProducts: Int
countries: [String]
applyOncePerOrder: Boolean
usageLimit: Int