From 833dc9bdcb835666adc5ffc9dcd815700c41a824 Mon Sep 17 00:00:00 2001 From: PCoder Date: Thu, 26 Dec 2019 11:41:29 +0530 Subject: [PATCH] Change stripe_tax_id field to char + regenerate migrations --- ...225_0300.py => 0007_auto_20191226_0610.py} | 22 +++++++++++++++- utils/migrations/0008_auto_20191225_0529.py | 25 ------------------- utils/migrations/0009_auto_20191225_1311.py | 25 ------------------- utils/models.py | 2 +- 4 files changed, 22 insertions(+), 52 deletions(-) rename utils/migrations/{0007_auto_20191225_0300.py => 0007_auto_20191226_0610.py} (93%) delete mode 100644 utils/migrations/0008_auto_20191225_0529.py delete mode 100644 utils/migrations/0009_auto_20191225_1311.py diff --git a/utils/migrations/0007_auto_20191225_0300.py b/utils/migrations/0007_auto_20191226_0610.py similarity index 93% rename from utils/migrations/0007_auto_20191225_0300.py rename to utils/migrations/0007_auto_20191226_0610.py index 72f5c836..c57c6431 100644 --- a/utils/migrations/0007_auto_20191225_0300.py +++ b/utils/migrations/0007_auto_20191226_0610.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Generated by Django 1.9.4 on 2019-12-25 03:00 +# Generated by Django 1.9.4 on 2019-12-26 06:10 from __future__ import unicode_literals from django.db import migrations, models @@ -13,16 +13,36 @@ class Migration(migrations.Migration): ] operations = [ + migrations.AddField( + model_name='billingaddress', + name='stripe_tax_id', + field=models.CharField(blank=True, default='', max_length=100), + ), migrations.AddField( model_name='billingaddress', name='vat_number', field=models.CharField(blank=True, default='', max_length=100), ), + migrations.AddField( + model_name='billingaddress', + name='vat_number_validated_on', + field=models.DateTimeField(blank=True, null=True), + ), + migrations.AddField( + model_name='userbillingaddress', + name='stripe_tax_id', + field=models.CharField(blank=True, default='', max_length=100), + ), migrations.AddField( model_name='userbillingaddress', name='vat_number', field=models.CharField(blank=True, default='', max_length=100), ), + migrations.AddField( + model_name='userbillingaddress', + name='vat_number_validated_on', + field=models.DateTimeField(blank=True, null=True), + ), migrations.AlterField( model_name='billingaddress', name='country', diff --git a/utils/migrations/0008_auto_20191225_0529.py b/utils/migrations/0008_auto_20191225_0529.py deleted file mode 100644 index 20a6183c..00000000 --- a/utils/migrations/0008_auto_20191225_0529.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9.4 on 2019-12-25 05:29 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('utils', '0007_auto_20191225_0300'), - ] - - operations = [ - migrations.AddField( - model_name='billingaddress', - name='vat_number_validated_on', - field=models.DateTimeField(blank=True, null=True), - ), - migrations.AddField( - model_name='userbillingaddress', - name='vat_number_validated_on', - field=models.DateTimeField(blank=True, null=True), - ), - ] diff --git a/utils/migrations/0009_auto_20191225_1311.py b/utils/migrations/0009_auto_20191225_1311.py deleted file mode 100644 index 866a5d12..00000000 --- a/utils/migrations/0009_auto_20191225_1311.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9.4 on 2019-12-25 13:11 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('utils', '0008_auto_20191225_0529'), - ] - - operations = [ - migrations.AddField( - model_name='billingaddress', - name='stripe_tax_id', - field=models.DateTimeField(blank=True, null=True), - ), - migrations.AddField( - model_name='userbillingaddress', - name='stripe_tax_id', - field=models.DateTimeField(blank=True, null=True), - ), - ] diff --git a/utils/models.py b/utils/models.py index c1a5e7b4..89475752 100644 --- a/utils/models.py +++ b/utils/models.py @@ -14,7 +14,7 @@ class BaseBillingAddress(models.Model): postal_code = models.CharField(max_length=50) country = CountryField() vat_number = models.CharField(max_length=100, default="", blank=True) - stripe_tax_id = models.DateTimeField(blank=True, null=True) + stripe_tax_id = models.CharField(max_length=100, default="", blank=True) vat_number_validated_on = models.DateTimeField(blank=True, null=True) class Meta: