diff --git a/djstripe/migrations/0008_related_names.py b/djstripe/migrations/0008_related_names.py new file mode 100644 index 00000000..85463234 --- /dev/null +++ b/djstripe/migrations/0008_related_names.py @@ -0,0 +1,64 @@ +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion +import djstripe.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('djstripe', '0007_2_4'), + ] + + operations = [ + migrations.AlterField( + model_name='invoice', + name='charge', + field=models.OneToOneField(help_text='The latest charge generated for this invoice, if any.', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='latest_%(class)s', to='djstripe.charge'), + ), + migrations.AlterField( + model_name='invoice', + name='customer', + field=djstripe.fields.StripeForeignKey(help_text='The customer associated with this invoice.', on_delete=django.db.models.deletion.CASCADE, related_name='%(class)ss', to='djstripe.customer', to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD), + ), + migrations.AlterField( + model_name='invoice', + name='default_tax_rates', + field=models.ManyToManyField(blank=True, db_table='djstripe_djstripeinvoicedefaulttaxrate', help_text='The tax rates applied to this invoice, if any.', related_name='+', to='djstripe.taxrate'), + ), + migrations.AlterField( + model_name='invoice', + name='subscription', + field=djstripe.fields.StripeForeignKey(help_text='The subscription that this invoice was prepared for, if any.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)ss', to='djstripe.subscription', to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD), + ), + migrations.AlterField( + model_name='invoiceitem', + name='tax_rates', + field=models.ManyToManyField(blank=True, db_table='djstripe_djstripeinvoiceitemtaxrate', help_text='The tax rates which apply to this invoice item. When set, the default_tax_rates on the invoice do not apply to this invoice item.', related_name='+', to='djstripe.taxrate'), + ), + migrations.AlterField( + model_name='subscription', + name='default_tax_rates', + field=models.ManyToManyField(blank=True, db_table='djstripe_djstripesubscriptiondefaulttaxrate', help_text='The tax rates that will apply to any subscription item that does not have tax_rates set. Invoices created will have their default_tax_rates populated from the subscription.', related_name='+', to='djstripe.taxrate'), + ), + migrations.AlterField( + model_name='subscriptionitem', + name='tax_rates', + field=models.ManyToManyField(blank=True, db_table='djstripe_djstripesubscriptionitemtaxrate', help_text='The tax rates which apply to this subscription_item. When set, the default_tax_rates on the subscription do not apply to this subscription_item.', related_name='+', to='djstripe.taxrate'), + ), + migrations.AlterField( + model_name='upcominginvoice', + name='charge', + field=models.OneToOneField(help_text='The latest charge generated for this invoice, if any.', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='latest_%(class)s', to='djstripe.charge'), + ), + migrations.AlterField( + model_name='upcominginvoice', + name='customer', + field=djstripe.fields.StripeForeignKey(help_text='The customer associated with this invoice.', on_delete=django.db.models.deletion.CASCADE, related_name='%(class)ss', to='djstripe.customer', to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD), + ), + migrations.AlterField( + model_name='upcominginvoice', + name='subscription', + field=djstripe.fields.StripeForeignKey(help_text='The subscription that this invoice was prepared for, if any.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)ss', to='djstripe.subscription', to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD), + ), + ] \ No newline at end of file