From 4567dfc14687e1aa488b81072ddaffb2a9600c1f Mon Sep 17 00:00:00 2001 From: alice Date: Sat, 14 Nov 2020 18:55:10 +0100 Subject: [PATCH] increase the length of payment and subscription ext ids --- .../migrations/0007_auto_20201114_1730.py | 26 +++++++++++++++++++ payments/models.py | 4 +-- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 payments/migrations/0007_auto_20201114_1730.py diff --git a/payments/migrations/0007_auto_20201114_1730.py b/payments/migrations/0007_auto_20201114_1730.py new file mode 100644 index 0000000..a275da1 --- /dev/null +++ b/payments/migrations/0007_auto_20201114_1730.py @@ -0,0 +1,26 @@ +# Generated by Django 3.1.2 on 2020-11-14 17:30 + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('payments', '0006_auto_20190907_2029'), + ] + + operations = [ + migrations.AlterField( + model_name='payment', + name='backend_extid', + field=models.CharField(blank=True, max_length=256, null=True), + ), + migrations.AlterField( + model_name='subscription', + name='backend_extid', + field=models.CharField(blank=True, max_length=256, null=True), + ), + ] diff --git a/payments/models.py b/payments/models.py index b33c39f..c5a53f7 100644 --- a/payments/models.py +++ b/payments/models.py @@ -131,7 +131,7 @@ class Payment(models.Model, BackendData): subscription = models.ForeignKey('Subscription', null=True, blank=True, on_delete=models.CASCADE) status_message = models.TextField(blank=True, null=True) - backend_extid = models.CharField(max_length=64, null=True, blank=True) + backend_extid = models.CharField(max_length=256, null=True, blank=True) backend_data = JSONField(blank=True) @property @@ -196,7 +196,7 @@ class Subscription(models.Model, BackendData): last_confirmed_payment = models.DateTimeField(blank=True, null=True) status = models.CharField(max_length=16, choices=SUBSCR_STATUS_CHOICES, default='new') - backend_extid = models.CharField(max_length=64, null=True, blank=True) + backend_extid = models.CharField(max_length=256, null=True, blank=True) backend_data = JSONField(blank=True) @property