Skip to content

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

Extend Transaction with customer id

Jakub Draganek4f776fb834a8
diff --git a/saleor/payment/migrations/0012_transaction_customer_id.py b/saleor/payment/migrations/0012_transaction_customer_id.py
new file mode 100644
index 0000000000..875e145884
--- /dev/null
+++ b/saleor/payment/migrations/0012_transaction_customer_id.py
@@ -0,0 +1,18 @@
+# Generated by Django 2.2.2 on 2019-06-28 12:24
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('payment', '0011_auto_20190516_0901'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='transaction',
+ name='customer_id',
+ field=models.CharField(max_length=256, null=True),
+ ),
+ ]
diff --git a/saleor/payment/models.py b/saleor/payment/models.py
index 5370ce4999..840ac96660 100644
--- a/saleor/payment/models.py
+++ b/saleor/payment/models.py
@@ -210,6 +210,7 @@ class Transaction(models.Model):
max_length=256,
null=True,
)
+ customer_id = models.CharField(max_length=256, null=True)
gateway_response = JSONField(encoder=DjangoJSONEncoder)
class Meta: