From 770b5e080bc6605e6365353177db2bb6aeda12c5 Mon Sep 17 00:00:00 2001 From: PCoder Date: Tue, 21 Aug 2018 13:24:54 +0200 Subject: [PATCH 1/4] Make UserCardDetail brand field 35 chars long --- hosting/migrations/0047_auto_20180821_1124.py | 20 +++++++++++++++++++ hosting/models.py | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 hosting/migrations/0047_auto_20180821_1124.py diff --git a/hosting/migrations/0047_auto_20180821_1124.py b/hosting/migrations/0047_auto_20180821_1124.py new file mode 100644 index 00000000..b74a8870 --- /dev/null +++ b/hosting/migrations/0047_auto_20180821_1124.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.4 on 2018-08-21 11:24 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('hosting', '0046_usercarddetail'), + ] + + operations = [ + migrations.AlterField( + model_name='usercarddetail', + name='brand', + field=models.CharField(max_length=35), + ), + ] diff --git a/hosting/models.py b/hosting/models.py index 3ae3b0a5..338d6052 100644 --- a/hosting/models.py +++ b/hosting/models.py @@ -212,7 +212,7 @@ class UserCardDetail(AssignPermissionsMixin, models.Model): permissions = ('view_usercarddetail',) stripe_customer = models.ForeignKey(StripeCustomer) last4 = models.CharField(max_length=4) - brand = models.CharField(max_length=10) + brand = models.CharField(max_length=35) card_id = models.CharField(max_length=100, blank=True, default='') fingerprint = models.CharField(max_length=100) exp_month = models.IntegerField(null=False) From 768b8ca8209886fc7459b1f65bf7078c63bd41fd Mon Sep 17 00:00:00 2001 From: PCoder Date: Tue, 21 Aug 2018 14:06:58 +0200 Subject: [PATCH 2/4] Change HostingOrder cc_brand field size to 35 chars --- hosting/migrations/0048_auto_20180821_1206.py | 20 +++++++++++++++++++ hosting/models.py | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 hosting/migrations/0048_auto_20180821_1206.py diff --git a/hosting/migrations/0048_auto_20180821_1206.py b/hosting/migrations/0048_auto_20180821_1206.py new file mode 100644 index 00000000..6939f63c --- /dev/null +++ b/hosting/migrations/0048_auto_20180821_1206.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.4 on 2018-08-21 12:06 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('hosting', '0047_auto_20180821_1124'), + ] + + operations = [ + migrations.AlterField( + model_name='hostingorder', + name='cc_brand', + field=models.CharField(max_length=35), + ), + ] diff --git a/hosting/models.py b/hosting/models.py index 338d6052..a15cdaa4 100644 --- a/hosting/models.py +++ b/hosting/models.py @@ -69,7 +69,7 @@ class HostingOrder(AssignPermissionsMixin, models.Model): created_at = models.DateTimeField(auto_now_add=True) approved = models.BooleanField(default=False) last4 = models.CharField(max_length=4) - cc_brand = models.CharField(max_length=10) + cc_brand = models.CharField(max_length=35) stripe_charge_id = models.CharField(max_length=100, null=True) price = models.FloatField() subscription_id = models.CharField(max_length=100, null=True) From 8bf6440110f9a545a53a62438ad3d5a45fb44f3a Mon Sep 17 00:00:00 2001 From: PCoder Date: Tue, 21 Aug 2018 14:41:16 +0200 Subject: [PATCH 3/4] Delete old migrations --- hosting/migrations/0047_auto_20180821_1124.py | 20 ------------------- hosting/migrations/0048_auto_20180821_1206.py | 20 ------------------- 2 files changed, 40 deletions(-) delete mode 100644 hosting/migrations/0047_auto_20180821_1124.py delete mode 100644 hosting/migrations/0048_auto_20180821_1206.py diff --git a/hosting/migrations/0047_auto_20180821_1124.py b/hosting/migrations/0047_auto_20180821_1124.py deleted file mode 100644 index b74a8870..00000000 --- a/hosting/migrations/0047_auto_20180821_1124.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9.4 on 2018-08-21 11:24 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('hosting', '0046_usercarddetail'), - ] - - operations = [ - migrations.AlterField( - model_name='usercarddetail', - name='brand', - field=models.CharField(max_length=35), - ), - ] diff --git a/hosting/migrations/0048_auto_20180821_1206.py b/hosting/migrations/0048_auto_20180821_1206.py deleted file mode 100644 index 6939f63c..00000000 --- a/hosting/migrations/0048_auto_20180821_1206.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9.4 on 2018-08-21 12:06 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('hosting', '0047_auto_20180821_1124'), - ] - - operations = [ - migrations.AlterField( - model_name='hostingorder', - name='cc_brand', - field=models.CharField(max_length=35), - ), - ] From b69abf3eddc001ad50b9b4c32897f32789a01ad0 Mon Sep 17 00:00:00 2001 From: PCoder Date: Tue, 21 Aug 2018 14:42:01 +0200 Subject: [PATCH 4/4] Make CC brand 128 characters long --- hosting/migrations/0047_auto_20180821_1240.py | 25 +++++++++++++++++++ hosting/models.py | 4 +-- 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 hosting/migrations/0047_auto_20180821_1240.py diff --git a/hosting/migrations/0047_auto_20180821_1240.py b/hosting/migrations/0047_auto_20180821_1240.py new file mode 100644 index 00000000..7976c58d --- /dev/null +++ b/hosting/migrations/0047_auto_20180821_1240.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.4 on 2018-08-21 12:40 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('hosting', '0046_usercarddetail'), + ] + + operations = [ + migrations.AlterField( + model_name='hostingorder', + name='cc_brand', + field=models.CharField(max_length=128), + ), + migrations.AlterField( + model_name='usercarddetail', + name='brand', + field=models.CharField(max_length=128), + ), + ] diff --git a/hosting/models.py b/hosting/models.py index a15cdaa4..e9fcdc7e 100644 --- a/hosting/models.py +++ b/hosting/models.py @@ -69,7 +69,7 @@ class HostingOrder(AssignPermissionsMixin, models.Model): created_at = models.DateTimeField(auto_now_add=True) approved = models.BooleanField(default=False) last4 = models.CharField(max_length=4) - cc_brand = models.CharField(max_length=35) + cc_brand = models.CharField(max_length=128) stripe_charge_id = models.CharField(max_length=100, null=True) price = models.FloatField() subscription_id = models.CharField(max_length=100, null=True) @@ -212,7 +212,7 @@ class UserCardDetail(AssignPermissionsMixin, models.Model): permissions = ('view_usercarddetail',) stripe_customer = models.ForeignKey(StripeCustomer) last4 = models.CharField(max_length=4) - brand = models.CharField(max_length=35) + brand = models.CharField(max_length=128) card_id = models.CharField(max_length=100, blank=True, default='') fingerprint = models.CharField(max_length=100) exp_month = models.IntegerField(null=False)