From 880acce4b75f213841167d7cf27cf9d2ed249abb Mon Sep 17 00:00:00 2001 From: Patrick Altman Date: Fri, 26 Nov 2021 14:17:04 -0600 Subject: [PATCH] Reset migrations --- pinax/stripe/migrations/0001_initial.py | 280 +---------------- .../migrations/0002_auto_20151205_1451.py | 30 -- .../migrations/0002_auto_20211126_1416.py | 23 ++ .../0003_make_cvc_check_blankable.py | 19 -- pinax/stripe/migrations/0004_plan_metadata.py | 22 -- .../migrations/0005_auto_20161006_1445.py | 20 -- pinax/stripe/migrations/0006_coupon.py | 40 --- .../migrations/0007_auto_20170108_1202.py | 21 -- .../migrations/0008_auto_20170509_1736.py | 25 -- .../migrations/0009_auto_20170825_1841.py | 21 -- pinax/stripe/migrations/0010_connect.py | 283 ------------------ .../migrations/0011_auto_20171121_1648.py | 24 -- .../migrations/0011_auto_20171123_2016.py | 57 ---- .../stripe/migrations/0013_charge_outcome.py | 21 -- .../migrations/0014_auto_20180413_1959.py | 18 -- .../stripe/migrations/0014_blank_with_null.py | 151 ---------- .../migrations/0015_auto_20211126_1406.py | 196 ------------ 17 files changed, 37 insertions(+), 1214 deletions(-) delete mode 100644 pinax/stripe/migrations/0002_auto_20151205_1451.py create mode 100644 pinax/stripe/migrations/0002_auto_20211126_1416.py delete mode 100644 pinax/stripe/migrations/0003_make_cvc_check_blankable.py delete mode 100644 pinax/stripe/migrations/0004_plan_metadata.py delete mode 100644 pinax/stripe/migrations/0005_auto_20161006_1445.py delete mode 100644 pinax/stripe/migrations/0006_coupon.py delete mode 100644 pinax/stripe/migrations/0007_auto_20170108_1202.py delete mode 100644 pinax/stripe/migrations/0008_auto_20170509_1736.py delete mode 100644 pinax/stripe/migrations/0009_auto_20170825_1841.py delete mode 100644 pinax/stripe/migrations/0010_connect.py delete mode 100644 pinax/stripe/migrations/0011_auto_20171121_1648.py delete mode 100644 pinax/stripe/migrations/0011_auto_20171123_2016.py delete mode 100644 pinax/stripe/migrations/0013_charge_outcome.py delete mode 100644 pinax/stripe/migrations/0014_auto_20180413_1959.py delete mode 100644 pinax/stripe/migrations/0014_blank_with_null.py delete mode 100644 pinax/stripe/migrations/0015_auto_20211126_1406.py diff --git a/pinax/stripe/migrations/0001_initial.py b/pinax/stripe/migrations/0001_initial.py index a8133ad64..cd57831c7 100644 --- a/pinax/stripe/migrations/0001_initial.py +++ b/pinax/stripe/migrations/0001_initial.py @@ -1,133 +1,34 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals +# Generated by Django 3.2.9 on 2021-11-26 20:16 -from decimal import Decimal - -import django.utils.timezone -from django.conf import settings from django.db import migrations, models - -import jsonfield.fields +import django.db.models.deletion +import django.utils.timezone class Migration(migrations.Migration): + initial = True + dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ - migrations.CreateModel( - name='BitcoinReceiver', - fields=[ - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True, serialize=False)), - ('stripe_id', models.CharField(unique=True, max_length=191)), - ('created_at', models.DateTimeField(default=django.utils.timezone.now)), - ('active', models.BooleanField(default=False)), - ('amount', models.DecimalField(decimal_places=2, max_digits=9)), - ('amount_received', models.DecimalField(decimal_places=2, max_digits=9, default=Decimal('0'))), - ('bitcoin_amount', models.PositiveIntegerField()), - ('bitcoin_amount_received', models.PositiveIntegerField(default=0)), - ('bitcoin_uri', models.TextField(blank=True)), - ('currency', models.CharField(max_length=10, default='usd')), - ('description', models.TextField(blank=True)), - ('email', models.TextField(blank=True)), - ('filled', models.BooleanField(default=False)), - ('inbound_address', models.TextField(blank=True)), - ('payment', models.TextField(blank=True)), - ('refund_address', models.TextField(blank=True)), - ('uncaptured_funds', models.BooleanField(default=False)), - ('used_for_payment', models.BooleanField(default=False)), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='Card', - fields=[ - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True, serialize=False)), - ('stripe_id', models.CharField(unique=True, max_length=191)), - ('created_at', models.DateTimeField(default=django.utils.timezone.now)), - ('name', models.TextField(blank=True)), - ('address_line_1', models.TextField(blank=True)), - ('address_line_1_check', models.CharField(max_length=15)), - ('address_line_2', models.TextField(blank=True)), - ('address_city', models.TextField(blank=True)), - ('address_state', models.TextField(blank=True)), - ('address_country', models.TextField(blank=True)), - ('address_zip', models.TextField(blank=True)), - ('address_zip_check', models.CharField(max_length=15)), - ('brand', models.TextField(blank=True)), - ('country', models.CharField(max_length=2)), - ('cvc_check', models.CharField(max_length=15)), - ('dynamic_last4', models.CharField(blank=True, max_length=4)), - ('tokenization_method', models.CharField(blank=True, max_length=15)), - ('exp_month', models.IntegerField()), - ('exp_year', models.IntegerField()), - ('funding', models.CharField(max_length=15)), - ('last4', models.CharField(blank=True, max_length=4)), - ('fingerprint', models.TextField()), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='Charge', - fields=[ - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True, serialize=False)), - ('stripe_id', models.CharField(unique=True, max_length=191)), - ('created_at', models.DateTimeField(default=django.utils.timezone.now)), - ('source', models.CharField(max_length=100)), - ('currency', models.CharField(max_length=10, default='usd')), - ('amount', models.DecimalField(null=True, decimal_places=2, max_digits=9)), - ('amount_refunded', models.DecimalField(null=True, decimal_places=2, max_digits=9)), - ('description', models.TextField(blank=True)), - ('paid', models.NullBooleanField()), - ('disputed', models.NullBooleanField()), - ('refunded', models.NullBooleanField()), - ('captured', models.NullBooleanField()), - ('receipt_sent', models.BooleanField(default=False)), - ('charge_created', models.DateTimeField(null=True, blank=True)), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='Customer', - fields=[ - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True, serialize=False)), - ('stripe_id', models.CharField(unique=True, max_length=191)), - ('created_at', models.DateTimeField(default=django.utils.timezone.now)), - ('account_balance', models.DecimalField(null=True, decimal_places=2, max_digits=9)), - ('currency', models.CharField(blank=True, max_length=10, default='usd')), - ('delinquent', models.BooleanField(default=False)), - ('default_source', models.TextField(blank=True)), - ('date_purged', models.DateTimeField(null=True, editable=False)), - ('user', models.OneToOneField(null=True, to=settings.AUTH_USER_MODEL, on_delete=models.CASCADE)), - ], - options={ - 'abstract': False, - }, - ), migrations.CreateModel( name='Event', fields=[ - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True, serialize=False)), - ('stripe_id', models.CharField(unique=True, max_length=191)), + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('stripe_id', models.CharField(max_length=191, unique=True)), ('created_at', models.DateTimeField(default=django.utils.timezone.now)), ('kind', models.CharField(max_length=250)), ('livemode', models.BooleanField(default=False)), - ('webhook_message', jsonfield.fields.JSONField()), - ('validated_message', jsonfield.fields.JSONField(null=True)), - ('valid', models.NullBooleanField()), + ('customer_id', models.CharField(blank=True, max_length=200)), + ('account_id', models.CharField(blank=True, max_length=200)), + ('webhook_message', models.TextField()), + ('validated_message', models.TextField(blank=True, null=True)), + ('valid', models.BooleanField(blank=True, null=True)), ('processed', models.BooleanField(default=False)), - ('request', models.CharField(blank=True, max_length=100)), ('pending_webhooks', models.PositiveIntegerField(default=0)), ('api_version', models.CharField(blank=True, max_length=100)), - ('customer', models.ForeignKey(null=True, to='pinax_stripe.Customer', on_delete=models.CASCADE)), ], options={ 'abstract': False, @@ -136,165 +37,12 @@ class Migration(migrations.Migration): migrations.CreateModel( name='EventProcessingException', fields=[ - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True, serialize=False)), + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('data', models.TextField()), ('message', models.CharField(max_length=500)), ('traceback', models.TextField()), ('created_at', models.DateTimeField(default=django.utils.timezone.now)), - ('event', models.ForeignKey(null=True, to='pinax_stripe.Event', on_delete=models.CASCADE)), - ], - ), - migrations.CreateModel( - name='Invoice', - fields=[ - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True, serialize=False)), - ('stripe_id', models.CharField(unique=True, max_length=191)), - ('created_at', models.DateTimeField(default=django.utils.timezone.now)), - ('amount_due', models.DecimalField(decimal_places=2, max_digits=9)), - ('attempted', models.NullBooleanField()), - ('attempt_count', models.PositiveIntegerField(null=True)), - ('statement_descriptor', models.TextField(blank=True)), - ('currency', models.CharField(max_length=10, default='usd')), - ('closed', models.BooleanField(default=False)), - ('description', models.TextField(blank=True)), - ('paid', models.BooleanField(default=False)), - ('receipt_number', models.TextField(blank=True)), - ('period_end', models.DateTimeField()), - ('period_start', models.DateTimeField()), - ('subtotal', models.DecimalField(decimal_places=2, max_digits=9)), - ('total', models.DecimalField(decimal_places=2, max_digits=9)), - ('date', models.DateTimeField()), - ('webhooks_delivered_at', models.DateTimeField(null=True)), - ('charge', models.ForeignKey(null=True, related_name='invoices', to='pinax_stripe.Charge', on_delete=models.CASCADE)), - ('customer', models.ForeignKey(related_name='invoices', to='pinax_stripe.Customer', on_delete=models.CASCADE)), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='InvoiceItem', - fields=[ - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True, serialize=False)), - ('stripe_id', models.CharField(max_length=255)), - ('created_at', models.DateTimeField(default=django.utils.timezone.now)), - ('amount', models.DecimalField(decimal_places=2, max_digits=9)), - ('currency', models.CharField(max_length=10, default='usd')), - ('kind', models.CharField(blank=True, max_length=25)), - ('period_start', models.DateTimeField()), - ('period_end', models.DateTimeField()), - ('proration', models.BooleanField(default=False)), - ('line_type', models.CharField(max_length=50)), - ('description', models.CharField(blank=True, max_length=200)), - ('quantity', models.IntegerField(null=True)), - ('invoice', models.ForeignKey(related_name='items', to='pinax_stripe.Invoice', on_delete=models.CASCADE)), - ], - ), - migrations.CreateModel( - name='Plan', - fields=[ - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True, serialize=False)), - ('stripe_id', models.CharField(unique=True, max_length=191)), - ('created_at', models.DateTimeField(default=django.utils.timezone.now)), - ('amount', models.DecimalField(decimal_places=2, max_digits=9)), - ('currency', models.CharField(max_length=15)), - ('interval', models.CharField(max_length=15)), - ('interval_count', models.IntegerField()), - ('name', models.CharField(max_length=150)), - ('statement_descriptor', models.TextField(blank=True)), - ('trial_period_days', models.IntegerField(null=True)), + ('event', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='pinax_stripe.event')), ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='Subscription', - fields=[ - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True, serialize=False)), - ('stripe_id', models.CharField(unique=True, max_length=191)), - ('created_at', models.DateTimeField(default=django.utils.timezone.now)), - ('application_fee_percent', models.DecimalField(null=True, decimal_places=2, max_digits=3, default=None)), - ('cancel_at_period_end', models.BooleanField(default=False)), - ('canceled_at', models.DateTimeField(null=True, blank=True)), - ('current_period_end', models.DateTimeField(null=True, blank=True)), - ('current_period_start', models.DateTimeField(null=True, blank=True)), - ('ended_at', models.DateTimeField(null=True, blank=True)), - ('quantity', models.IntegerField()), - ('start', models.DateTimeField()), - ('status', models.CharField(max_length=25)), - ('trial_end', models.DateTimeField(null=True, blank=True)), - ('trial_start', models.DateTimeField(null=True, blank=True)), - ('customer', models.ForeignKey(to='pinax_stripe.Customer', on_delete=models.CASCADE)), - ('plan', models.ForeignKey(to='pinax_stripe.Plan', on_delete=models.CASCADE)), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='Transfer', - fields=[ - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True, serialize=False)), - ('stripe_id', models.CharField(unique=True, max_length=191)), - ('created_at', models.DateTimeField(default=django.utils.timezone.now)), - ('amount', models.DecimalField(decimal_places=2, max_digits=9)), - ('currency', models.CharField(max_length=25, default='usd')), - ('status', models.CharField(max_length=25)), - ('date', models.DateTimeField()), - ('description', models.TextField(null=True, blank=True)), - ('event', models.ForeignKey(related_name='transfers', to='pinax_stripe.Event', on_delete=models.CASCADE)), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='TransferChargeFee', - fields=[ - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True, serialize=False)), - ('amount', models.DecimalField(decimal_places=2, max_digits=9)), - ('currency', models.CharField(max_length=10, default='usd')), - ('application', models.TextField(null=True, blank=True)), - ('description', models.TextField(null=True, blank=True)), - ('kind', models.CharField(max_length=150)), - ('created_at', models.DateTimeField(default=django.utils.timezone.now)), - ('transfer', models.ForeignKey(related_name='charge_fee_details', to='pinax_stripe.Transfer', on_delete=models.CASCADE)), - ], - ), - migrations.AddField( - model_name='invoiceitem', - name='plan', - field=models.ForeignKey(null=True, to='pinax_stripe.Plan', on_delete=models.CASCADE), - ), - migrations.AddField( - model_name='invoiceitem', - name='subscription', - field=models.ForeignKey(null=True, to='pinax_stripe.Subscription', on_delete=models.CASCADE), - ), - migrations.AddField( - model_name='invoice', - name='subscription', - field=models.ForeignKey(null=True, to='pinax_stripe.Subscription', on_delete=models.CASCADE), - ), - migrations.AddField( - model_name='charge', - name='customer', - field=models.ForeignKey(related_name='charges', to='pinax_stripe.Customer', on_delete=models.CASCADE), - ), - migrations.AddField( - model_name='charge', - name='invoice', - field=models.ForeignKey(null=True, related_name='charges', to='pinax_stripe.Invoice', on_delete=models.CASCADE), - ), - migrations.AddField( - model_name='card', - name='customer', - field=models.ForeignKey(to='pinax_stripe.Customer', on_delete=models.CASCADE), - ), - migrations.AddField( - model_name='bitcoinreceiver', - name='customer', - field=models.ForeignKey(to='pinax_stripe.Customer', on_delete=models.CASCADE), ), ] diff --git a/pinax/stripe/migrations/0002_auto_20151205_1451.py b/pinax/stripe/migrations/0002_auto_20151205_1451.py deleted file mode 100644 index 65a79c2ef..000000000 --- a/pinax/stripe/migrations/0002_auto_20151205_1451.py +++ /dev/null @@ -1,30 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.conf import settings -from django.db import connection, migrations, models - - -def migrate_customers(apps, schema_editor): - cursor = connection.cursor() - if "payments_customer" in connection.introspection.table_names(): - cursor.execute("SELECT user_id, stripe_id, date_purged FROM payments_customer") - Customer = apps.get_model("pinax_stripe", "Customer") - for row in cursor.fetchall(): - Customer.objects.create( - user_id=row[0], - stripe_id=row[1], - date_purged=row[2] - ) - - -class Migration(migrations.Migration): - - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('pinax_stripe', '0001_initial'), - ] - - operations = [ - migrations.RunPython(migrate_customers) - ] diff --git a/pinax/stripe/migrations/0002_auto_20211126_1416.py b/pinax/stripe/migrations/0002_auto_20211126_1416.py new file mode 100644 index 000000000..06593e096 --- /dev/null +++ b/pinax/stripe/migrations/0002_auto_20211126_1416.py @@ -0,0 +1,23 @@ +# Generated by Django 3.2.9 on 2021-11-26 20:16 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('pinax_stripe', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='event', + name='validated_message', + field=models.JSONField(blank=True, null=True), + ), + migrations.AlterField( + model_name='event', + name='webhook_message', + field=models.JSONField(), + ), + ] diff --git a/pinax/stripe/migrations/0003_make_cvc_check_blankable.py b/pinax/stripe/migrations/0003_make_cvc_check_blankable.py deleted file mode 100644 index fe425236f..000000000 --- a/pinax/stripe/migrations/0003_make_cvc_check_blankable.py +++ /dev/null @@ -1,19 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('pinax_stripe', '0002_auto_20151205_1451'), - ] - - operations = [ - migrations.AlterField( - model_name='card', - name='cvc_check', - field=models.CharField(blank=True, max_length=15), - ), - ] diff --git a/pinax/stripe/migrations/0004_plan_metadata.py b/pinax/stripe/migrations/0004_plan_metadata.py deleted file mode 100644 index 356adbf32..000000000 --- a/pinax/stripe/migrations/0004_plan_metadata.py +++ /dev/null @@ -1,22 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.10.1 on 2016-10-03 16:33 -from __future__ import unicode_literals - -from django.db import migrations - -import jsonfield.fields - - -class Migration(migrations.Migration): - - dependencies = [ - ('pinax_stripe', '0003_make_cvc_check_blankable'), - ] - - operations = [ - migrations.AddField( - model_name='plan', - name='metadata', - field=jsonfield.fields.JSONField(null=True), - ), - ] diff --git a/pinax/stripe/migrations/0005_auto_20161006_1445.py b/pinax/stripe/migrations/0005_auto_20161006_1445.py deleted file mode 100644 index 35945a96c..000000000 --- a/pinax/stripe/migrations/0005_auto_20161006_1445.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.10 on 2016-10-06 08:45 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('pinax_stripe', '0004_plan_metadata'), - ] - - operations = [ - migrations.AlterField( - model_name='card', - name='country', - field=models.CharField(blank=True, max_length=2), - ), - ] diff --git a/pinax/stripe/migrations/0006_coupon.py b/pinax/stripe/migrations/0006_coupon.py deleted file mode 100644 index ae94af754..000000000 --- a/pinax/stripe/migrations/0006_coupon.py +++ /dev/null @@ -1,40 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9.10 on 2016-12-20 03:16 -from __future__ import unicode_literals - -import django.utils.timezone -from django.db import migrations, models - -import jsonfield.fields - - -class Migration(migrations.Migration): - - dependencies = [ - ('pinax_stripe', '0005_auto_20161006_1445'), - ] - - operations = [ - migrations.CreateModel( - name='Coupon', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('stripe_id', models.CharField(max_length=191, unique=True)), - ('created_at', models.DateTimeField(default=django.utils.timezone.now)), - ('amount_off', models.DecimalField(decimal_places=2, max_digits=9, null=True)), - ('currency', models.CharField(default='usd', max_length=10)), - ('duration', models.CharField(default='once', max_length=10)), - ('duration_in_months', models.PositiveIntegerField(null=True)), - ('livemode', models.BooleanField(default=False)), - ('max_redemptions', models.PositiveIntegerField(null=True)), - ('metadata', jsonfield.fields.JSONField(null=True)), - ('percent_off', models.PositiveIntegerField(null=True)), - ('redeem_by', models.DateTimeField(null=True)), - ('times_redeemed', models.PositiveIntegerField(null=True)), - ('valid', models.BooleanField(default=False)), - ], - options={ - 'abstract': False, - }, - ), - ] diff --git a/pinax/stripe/migrations/0007_auto_20170108_1202.py b/pinax/stripe/migrations/0007_auto_20170108_1202.py deleted file mode 100644 index 5859fb49b..000000000 --- a/pinax/stripe/migrations/0007_auto_20170108_1202.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9.8 on 2017-01-08 18:02 -from __future__ import unicode_literals - -import django.db.models.deletion -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('pinax_stripe', '0006_coupon'), - ] - - operations = [ - migrations.AlterField( - model_name='charge', - name='customer', - field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='charges', to='pinax_stripe.Customer'), - ), - ] diff --git a/pinax/stripe/migrations/0008_auto_20170509_1736.py b/pinax/stripe/migrations/0008_auto_20170509_1736.py deleted file mode 100644 index e2dfecfeb..000000000 --- a/pinax/stripe/migrations/0008_auto_20170509_1736.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.10 on 2017-05-09 17:36 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('pinax_stripe', '0007_auto_20170108_1202'), - ] - - operations = [ - migrations.AddField( - model_name='invoice', - name='tax', - field=models.DecimalField(decimal_places=2, max_digits=9, null=True), - ), - migrations.AddField( - model_name='invoice', - name='tax_percent', - field=models.DecimalField(decimal_places=2, max_digits=9, null=True), - ), - ] diff --git a/pinax/stripe/migrations/0009_auto_20170825_1841.py b/pinax/stripe/migrations/0009_auto_20170825_1841.py deleted file mode 100644 index 0c8f8bcc2..000000000 --- a/pinax/stripe/migrations/0009_auto_20170825_1841.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.11 on 2017-08-25 18:41 -from __future__ import unicode_literals - -import django.db.models.deletion -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('pinax_stripe', '0008_auto_20170509_1736'), - ] - - operations = [ - migrations.AlterField( - model_name='transfer', - name='event', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='transfers', to='pinax_stripe.Event'), - ), - ] diff --git a/pinax/stripe/migrations/0010_connect.py b/pinax/stripe/migrations/0010_connect.py deleted file mode 100644 index 603b47ea0..000000000 --- a/pinax/stripe/migrations/0010_connect.py +++ /dev/null @@ -1,283 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.10.2 on 2017-11-16 01:12 -from __future__ import unicode_literals - -from django.conf import settings -from django.db import migrations, models -import django.db.models.deletion -import django.utils.timezone -import jsonfield.fields - - -class Migration(migrations.Migration): - - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('pinax_stripe', '0009_auto_20170825_1841'), - ] - - operations = [ - migrations.CreateModel( - name='Account', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('stripe_id', models.CharField(max_length=191, unique=True)), - ('created_at', models.DateTimeField(default=django.utils.timezone.now)), - ('business_name', models.TextField(blank=True, null=True)), - ('business_url', models.TextField(blank=True, null=True)), - ('charges_enabled', models.BooleanField(default=False)), - ('country', models.CharField(max_length=2)), - ('debit_negative_balances', models.BooleanField(default=False)), - ('decline_charge_on_avs_failure', models.BooleanField(default=False)), - ('decline_charge_on_cvc_failure', models.BooleanField(default=False)), - ('default_currency', models.CharField(max_length=3)), - ('details_submitted', models.BooleanField(default=False)), - ('display_name', models.TextField()), - ('email', models.TextField(blank=True, null=True)), - ('legal_entity_address_city', models.TextField(blank=True, null=True)), - ('legal_entity_address_country', models.TextField(blank=True, null=True)), - ('legal_entity_address_line1', models.TextField(blank=True, null=True)), - ('legal_entity_address_line2', models.TextField(blank=True, null=True)), - ('legal_entity_address_postal_code', models.TextField(blank=True, null=True)), - ('legal_entity_address_state', models.TextField(blank=True, null=True)), - ('legal_entity_dob', models.DateField(null=True)), - ('legal_entity_first_name', models.TextField(blank=True, null=True)), - ('legal_entity_gender', models.TextField(blank=True, null=True)), - ('legal_entity_last_name', models.TextField(blank=True, null=True)), - ('legal_entity_maiden_name', models.TextField(blank=True, null=True)), - ('legal_entity_personal_id_number_provided', models.BooleanField(default=False)), - ('legal_entity_phone_number', models.TextField(blank=True, null=True)), - ('legal_entity_ssn_last_4_provided', models.BooleanField(default=False)), - ('legal_entity_type', models.TextField(blank=True, null=True)), - ('legal_entity_verification_details', models.TextField(blank=True, null=True)), - ('legal_entity_verification_details_code', models.TextField(blank=True, null=True)), - ('legal_entity_verification_document', models.TextField(blank=True, null=True)), - ('legal_entity_verification_status', models.TextField(blank=True, null=True)), - ('type', models.TextField(blank=True, null=True)), - ('metadata', jsonfield.fields.JSONField(blank=True, null=True)), - ('stripe_publishable_key', models.CharField(blank=True, max_length=100, null=True)), - ('product_description', models.TextField(blank=True, null=True)), - ('statement_descriptor', models.TextField(blank=True, null=True)), - ('support_email', models.TextField(blank=True, null=True)), - ('support_phone', models.TextField(blank=True, null=True)), - ('timezone', models.TextField(blank=True, null=True)), - ('tos_acceptance_date', models.DateField(null=True)), - ('tos_acceptance_ip', models.TextField(blank=True, null=True)), - ('tos_acceptance_user_agent', models.TextField(blank=True, null=True)), - ('transfer_schedule_delay_days', models.PositiveSmallIntegerField(null=True)), - ('transfer_schedule_interval', models.TextField(blank=True, null=True)), - ('transfer_schedule_monthly_anchor', models.PositiveSmallIntegerField(null=True)), - ('transfer_schedule_weekly_anchor', models.TextField(blank=True, null=True)), - ('transfer_statement_descriptor', models.TextField(blank=True, null=True)), - ('transfers_enabled', models.BooleanField(default=False)), - ('verification_disabled_reason', models.TextField(blank=True, null=True)), - ('verification_due_by', models.DateTimeField(blank=True, null=True)), - ('verification_timestamp', models.DateTimeField(blank=True, null=True)), - ('verification_fields_needed', jsonfield.fields.JSONField(blank=True, null=True)), - ('authorized', models.BooleanField(default=True)), - ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='stripe_accounts', to=settings.AUTH_USER_MODEL)), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='BankAccount', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('stripe_id', models.CharField(max_length=191, unique=True)), - ('created_at', models.DateTimeField(default=django.utils.timezone.now)), - ('account_holder_name', models.TextField()), - ('account_holder_type', models.TextField()), - ('bank_name', models.TextField(blank=True, null=True)), - ('country', models.TextField()), - ('currency', models.TextField()), - ('default_for_currency', models.BooleanField(default=False)), - ('fingerprint', models.TextField()), - ('last4', models.CharField(max_length=4)), - ('metadata', jsonfield.fields.JSONField(blank=True, null=True)), - ('routing_number', models.TextField()), - ('status', models.TextField()), - ('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='bank_accounts', to='pinax_stripe.Account')), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='UserAccount', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='user_accounts', related_query_name='user_account', to='pinax_stripe.Account')), - ], - ), - migrations.AddField( - model_name='charge', - name='available', - field=models.BooleanField(default=False), - ), - migrations.AddField( - model_name='charge', - name='available_on', - field=models.DateTimeField(blank=True, null=True), - ), - migrations.AddField( - model_name='charge', - name='fee', - field=models.DecimalField(blank=True, decimal_places=2, max_digits=9, null=True), - ), - migrations.AddField( - model_name='charge', - name='fee_currency', - field=models.CharField(blank=True, max_length=10, null=True), - ), - migrations.AddField( - model_name='charge', - name='transfer_group', - field=models.TextField(blank=True, null=True), - ), - migrations.AddField( - model_name='transfer', - name='amount_reversed', - field=models.DecimalField(blank=True, decimal_places=2, max_digits=9, null=True), - ), - migrations.AddField( - model_name='transfer', - name='application_fee', - field=models.DecimalField(blank=True, decimal_places=2, max_digits=9, null=True), - ), - migrations.AddField( - model_name='transfer', - name='created', - field=models.DateTimeField(blank=True, null=True), - ), - migrations.AddField( - model_name='transfer', - name='destination', - field=models.TextField(blank=True, null=True), - ), - migrations.AddField( - model_name='transfer', - name='destination_payment', - field=models.TextField(blank=True, null=True), - ), - migrations.AddField( - model_name='transfer', - name='failure_code', - field=models.TextField(blank=True, null=True), - ), - migrations.AddField( - model_name='transfer', - name='failure_message', - field=models.TextField(blank=True, null=True), - ), - migrations.AddField( - model_name='transfer', - name='livemode', - field=models.BooleanField(default=False), - ), - migrations.AddField( - model_name='transfer', - name='metadata', - field=jsonfield.fields.JSONField(blank=True, null=True), - ), - migrations.AddField( - model_name='transfer', - name='method', - field=models.TextField(blank=True, null=True), - ), - migrations.AddField( - model_name='transfer', - name='reversed', - field=models.BooleanField(default=False), - ), - migrations.AddField( - model_name='transfer', - name='source_transaction', - field=models.TextField(blank=True, null=True), - ), - migrations.AddField( - model_name='transfer', - name='source_type', - field=models.TextField(blank=True, null=True), - ), - migrations.AddField( - model_name='transfer', - name='statement_descriptor', - field=models.TextField(blank=True, null=True), - ), - migrations.AddField( - model_name='transfer', - name='transfer_group', - field=models.TextField(blank=True, null=True), - ), - migrations.AddField( - model_name='transfer', - name='type', - field=models.TextField(blank=True, null=True), - ), - migrations.AlterField( - model_name='coupon', - name='metadata', - field=jsonfield.fields.JSONField(blank=True, null=True), - ), - migrations.AlterField( - model_name='customer', - name='account_balance', - field=models.DecimalField(blank=True, decimal_places=2, max_digits=9, null=True), - ), - migrations.AlterField( - model_name='customer', - name='user', - field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), - ), - migrations.AlterField( - model_name='event', - name='validated_message', - field=jsonfield.fields.JSONField(blank=True, null=True), - ), - migrations.AlterField( - model_name='plan', - name='metadata', - field=jsonfield.fields.JSONField(blank=True, null=True), - ), - migrations.AddField( - model_name='useraccount', - name='customer', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='user_accounts', related_query_name='user_account', to='pinax_stripe.Customer'), - ), - migrations.AddField( - model_name='useraccount', - name='user', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='user_accounts', related_query_name='user_account', to=settings.AUTH_USER_MODEL), - ), - migrations.AddField( - model_name='customer', - name='stripe_account', - field=models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to='pinax_stripe.Account'), - ), - migrations.AddField( - model_name='customer', - name='users', - field=models.ManyToManyField(related_name='customers', related_query_name='customers', through='pinax_stripe.UserAccount', to=settings.AUTH_USER_MODEL), - ), - migrations.AddField( - model_name='event', - name='stripe_account', - field=models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to='pinax_stripe.Account'), - ), - migrations.AddField( - model_name='plan', - name='stripe_account', - field=models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to='pinax_stripe.Account'), - ), - migrations.AddField( - model_name='transfer', - name='stripe_account', - field=models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to='pinax_stripe.Account'), - ), - migrations.AlterUniqueTogether( - name='useraccount', - unique_together=set([('user', 'account')]), - ), - ] diff --git a/pinax/stripe/migrations/0011_auto_20171121_1648.py b/pinax/stripe/migrations/0011_auto_20171121_1648.py deleted file mode 100644 index 5782b3ed6..000000000 --- a/pinax/stripe/migrations/0011_auto_20171121_1648.py +++ /dev/null @@ -1,24 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.11.6 on 2017-11-21 16:48 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('pinax_stripe', '0010_connect'), - ] - - operations = [ - migrations.AlterField( - model_name='plan', - name='stripe_id', - field=models.CharField(max_length=191), - ), - migrations.AlterUniqueTogether( - name='plan', - unique_together=set([('stripe_id', 'stripe_account')]), - ), - ] diff --git a/pinax/stripe/migrations/0011_auto_20171123_2016.py b/pinax/stripe/migrations/0011_auto_20171123_2016.py deleted file mode 100644 index 4f3ed3707..000000000 --- a/pinax/stripe/migrations/0011_auto_20171123_2016.py +++ /dev/null @@ -1,57 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.11.6 on 2017-11-23 20:16 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('pinax_stripe', '0011_auto_20171121_1648'), - ] - - operations = [ - migrations.RenameField( - model_name='account', - old_name='transfer_schedule_weekly_anchor', - new_name='payout_schedule_weekly_anchor', - ), - migrations.RenameField( - model_name='account', - old_name='transfer_statement_descriptor', - new_name='payout_statement_descriptor', - ), - migrations.RenameField( - model_name='account', - old_name='transfers_enabled', - new_name='payouts_enabled', - ), - migrations.RemoveField( - model_name='account', - name='transfer_schedule_delay_days', - ), - migrations.RemoveField( - model_name='account', - name='transfer_schedule_interval', - ), - migrations.RemoveField( - model_name='account', - name='transfer_schedule_monthly_anchor', - ), - migrations.AddField( - model_name='account', - name='payout_schedule_delay_days', - field=models.PositiveSmallIntegerField(blank=True, null=True), - ), - migrations.AddField( - model_name='account', - name='payout_schedule_interval', - field=models.CharField(blank=True, choices=[('Manual', 'manual'), ('Daily', 'daily'), ('Weekly', 'weekly'), ('Monthly', 'monthly')], max_length=7, null=True), - ), - migrations.AddField( - model_name='account', - name='payout_schedule_monthly_anchor', - field=models.PositiveSmallIntegerField(blank=True, null=True), - ), - ] diff --git a/pinax/stripe/migrations/0013_charge_outcome.py b/pinax/stripe/migrations/0013_charge_outcome.py deleted file mode 100644 index bcb9183e8..000000000 --- a/pinax/stripe/migrations/0013_charge_outcome.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.11.6 on 2017-11-22 15:40 -from __future__ import unicode_literals - -from django.db import migrations -import jsonfield.fields - - -class Migration(migrations.Migration): - - dependencies = [ - ('pinax_stripe', '0014_blank_with_null'), - ] - - operations = [ - migrations.AddField( - model_name='charge', - name='outcome', - field=jsonfield.fields.JSONField(blank=True, null=True), - ), - ] diff --git a/pinax/stripe/migrations/0014_auto_20180413_1959.py b/pinax/stripe/migrations/0014_auto_20180413_1959.py deleted file mode 100644 index 23eab7849..000000000 --- a/pinax/stripe/migrations/0014_auto_20180413_1959.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.0.4 on 2018-04-14 00:59 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('pinax_stripe', '0013_charge_outcome'), - ] - - operations = [ - migrations.AlterField( - model_name='account', - name='display_name', - field=models.TextField(blank=True, null=True), - ), - ] diff --git a/pinax/stripe/migrations/0014_blank_with_null.py b/pinax/stripe/migrations/0014_blank_with_null.py deleted file mode 100644 index 6673432aa..000000000 --- a/pinax/stripe/migrations/0014_blank_with_null.py +++ /dev/null @@ -1,151 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.11.6 on 2017-11-24 16:30 -from __future__ import unicode_literals - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('pinax_stripe', '0011_auto_20171123_2016'), - ] - - operations = [ - migrations.AlterField( - model_name='account', - name='legal_entity_dob', - field=models.DateField(blank=True, null=True), - ), - migrations.AlterField( - model_name='account', - name='tos_acceptance_date', - field=models.DateField(blank=True, null=True), - ), - migrations.AlterField( - model_name='charge', - name='amount', - field=models.DecimalField(blank=True, decimal_places=2, max_digits=9, null=True), - ), - migrations.AlterField( - model_name='charge', - name='amount_refunded', - field=models.DecimalField(blank=True, decimal_places=2, max_digits=9, null=True), - ), - migrations.AlterField( - model_name='charge', - name='customer', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='charges', to='pinax_stripe.Customer'), - ), - migrations.AlterField( - model_name='charge', - name='invoice', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='charges', to='pinax_stripe.Invoice'), - ), - migrations.AlterField( - model_name='charge', - name='source', - field=models.CharField(blank=True, max_length=100), - ), - migrations.AlterField( - model_name='coupon', - name='amount_off', - field=models.DecimalField(blank=True, decimal_places=2, max_digits=9, null=True), - ), - migrations.AlterField( - model_name='coupon', - name='duration_in_months', - field=models.PositiveIntegerField(blank=True, null=True), - ), - migrations.AlterField( - model_name='coupon', - name='max_redemptions', - field=models.PositiveIntegerField(blank=True, null=True), - ), - migrations.AlterField( - model_name='coupon', - name='percent_off', - field=models.PositiveIntegerField(blank=True, null=True), - ), - migrations.AlterField( - model_name='coupon', - name='redeem_by', - field=models.DateTimeField(blank=True, null=True), - ), - migrations.AlterField( - model_name='coupon', - name='times_redeemed', - field=models.PositiveIntegerField(blank=True, null=True), - ), - migrations.AlterField( - model_name='customer', - name='date_purged', - field=models.DateTimeField(blank=True, editable=False, null=True), - ), - migrations.AlterField( - model_name='event', - name='customer', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='pinax_stripe.Customer'), - ), - migrations.AlterField( - model_name='eventprocessingexception', - name='event', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='pinax_stripe.Event'), - ), - migrations.AlterField( - model_name='invoice', - name='attempt_count', - field=models.PositiveIntegerField(blank=True, null=True), - ), - migrations.AlterField( - model_name='invoice', - name='charge', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='invoices', to='pinax_stripe.Charge'), - ), - migrations.AlterField( - model_name='invoice', - name='subscription', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='pinax_stripe.Subscription'), - ), - migrations.AlterField( - model_name='invoice', - name='tax', - field=models.DecimalField(blank=True, decimal_places=2, max_digits=9, null=True), - ), - migrations.AlterField( - model_name='invoice', - name='tax_percent', - field=models.DecimalField(blank=True, decimal_places=2, max_digits=9, null=True), - ), - migrations.AlterField( - model_name='invoice', - name='webhooks_delivered_at', - field=models.DateTimeField(blank=True, null=True), - ), - migrations.AlterField( - model_name='invoiceitem', - name='plan', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='pinax_stripe.Plan'), - ), - migrations.AlterField( - model_name='invoiceitem', - name='quantity', - field=models.IntegerField(blank=True, null=True), - ), - migrations.AlterField( - model_name='invoiceitem', - name='subscription', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='pinax_stripe.Subscription'), - ), - migrations.AlterField( - model_name='plan', - name='trial_period_days', - field=models.IntegerField(blank=True, null=True), - ), - migrations.AlterField( - model_name='subscription', - name='application_fee_percent', - field=models.DecimalField(blank=True, decimal_places=2, default=None, max_digits=3, null=True), - ), - ] diff --git a/pinax/stripe/migrations/0015_auto_20211126_1406.py b/pinax/stripe/migrations/0015_auto_20211126_1406.py deleted file mode 100644 index dbe4f14fd..000000000 --- a/pinax/stripe/migrations/0015_auto_20211126_1406.py +++ /dev/null @@ -1,196 +0,0 @@ -# Generated by Django 3.2.9 on 2021-11-26 20:06 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('pinax_stripe', '0014_auto_20180413_1959'), - ] - - operations = [ - migrations.RemoveField( - model_name='account', - name='user', - ), - migrations.RemoveField( - model_name='bankaccount', - name='account', - ), - migrations.RemoveField( - model_name='bitcoinreceiver', - name='customer', - ), - migrations.RemoveField( - model_name='card', - name='customer', - ), - migrations.RemoveField( - model_name='charge', - name='customer', - ), - migrations.RemoveField( - model_name='charge', - name='invoice', - ), - migrations.DeleteModel( - name='Coupon', - ), - migrations.RemoveField( - model_name='customer', - name='stripe_account', - ), - migrations.RemoveField( - model_name='customer', - name='user', - ), - migrations.RemoveField( - model_name='customer', - name='users', - ), - migrations.RemoveField( - model_name='invoice', - name='charge', - ), - migrations.RemoveField( - model_name='invoice', - name='customer', - ), - migrations.RemoveField( - model_name='invoice', - name='subscription', - ), - migrations.RemoveField( - model_name='invoiceitem', - name='invoice', - ), - migrations.RemoveField( - model_name='invoiceitem', - name='plan', - ), - migrations.RemoveField( - model_name='invoiceitem', - name='subscription', - ), - migrations.AlterUniqueTogether( - name='plan', - unique_together=None, - ), - migrations.RemoveField( - model_name='plan', - name='stripe_account', - ), - migrations.RemoveField( - model_name='subscription', - name='customer', - ), - migrations.RemoveField( - model_name='subscription', - name='plan', - ), - migrations.RemoveField( - model_name='transfer', - name='event', - ), - migrations.RemoveField( - model_name='transfer', - name='stripe_account', - ), - migrations.RemoveField( - model_name='transferchargefee', - name='transfer', - ), - migrations.AlterUniqueTogether( - name='useraccount', - unique_together=None, - ), - migrations.RemoveField( - model_name='useraccount', - name='account', - ), - migrations.RemoveField( - model_name='useraccount', - name='customer', - ), - migrations.RemoveField( - model_name='useraccount', - name='user', - ), - migrations.RemoveField( - model_name='event', - name='customer', - ), - migrations.RemoveField( - model_name='event', - name='request', - ), - migrations.RemoveField( - model_name='event', - name='stripe_account', - ), - migrations.AddField( - model_name='event', - name='account_id', - field=models.CharField(blank=True, max_length=200), - ), - migrations.AddField( - model_name='event', - name='customer_id', - field=models.CharField(blank=True, max_length=200), - ), - migrations.AlterField( - model_name='event', - name='valid', - field=models.BooleanField(blank=True, null=True), - ), - migrations.AlterField( - model_name='event', - name='validated_message', - field=models.JSONField(blank=True, null=True), - ), - migrations.AlterField( - model_name='event', - name='webhook_message', - field=models.JSONField(), - ), - migrations.DeleteModel( - name='Account', - ), - migrations.DeleteModel( - name='BankAccount', - ), - migrations.DeleteModel( - name='BitcoinReceiver', - ), - migrations.DeleteModel( - name='Card', - ), - migrations.DeleteModel( - name='Charge', - ), - migrations.DeleteModel( - name='Customer', - ), - migrations.DeleteModel( - name='Invoice', - ), - migrations.DeleteModel( - name='InvoiceItem', - ), - migrations.DeleteModel( - name='Plan', - ), - migrations.DeleteModel( - name='Subscription', - ), - migrations.DeleteModel( - name='Transfer', - ), - migrations.DeleteModel( - name='TransferChargeFee', - ), - migrations.DeleteModel( - name='UserAccount', - ), - ]