Skip to content

Commit

Permalink
add migration for related names
Browse files Browse the repository at this point in the history
  • Loading branch information
adlindenberg committed Sep 11, 2024
1 parent 33ddb96 commit bfe9fc9
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions djstripe/migrations/0008_related_names.py
Original file line number Diff line number Diff line change
@@ -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),
),
]

0 comments on commit bfe9fc9

Please sign in to comment.