Skip to content

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

Migrate charge status of payment to maximum 20 characters

Unknowne3f882802f3b
diff --git a/saleor/payment/migrations/0007_auto_20190125_0242.py b/saleor/payment/migrations/0007_auto_20190125_0242.py
new file mode 100644
index 0000000000..85e1c0d9b0
--- /dev/null
+++ b/saleor/payment/migrations/0007_auto_20190125_0242.py
@@ -0,0 +1,18 @@
+# Generated by Django 2.1.4 on 2019-01-25 08:42
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('payment', '0006_auto_20190109_0358'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='payment',
+ name='charge_status',
+ field=models.CharField(choices=[('not-charged', 'Not charged'), ('charged', 'Charged'), ('partially-refunded', 'Partially refunded'), ('fully-refunded', 'Fully refunded')], default='not-charged', max_length=20),
+ ),
+ ]
diff --git a/saleor/payment/models.py b/saleor/payment/models.py
index 435ca51650..ee89694a08 100644
--- a/saleor/payment/models.py
+++ b/saleor/payment/models.py
@@ -35,7 +35,7 @@ class Payment(models.Model):
#: Date and time of last modification
modified = models.DateTimeField(auto_now=True)
charge_status = models.CharField(
- max_length=15,
+ max_length=20,
choices=ChargeStatus.CHOICES,
default=ChargeStatus.NOT_CHARGED)