diff options
Diffstat (limited to 'alphabetlearning/payments/migrations/0002_initial.py')
-rw-r--r-- | alphabetlearning/payments/migrations/0002_initial.py | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/alphabetlearning/payments/migrations/0002_initial.py b/alphabetlearning/payments/migrations/0002_initial.py new file mode 100644 index 0000000..04df889 --- /dev/null +++ b/alphabetlearning/payments/migrations/0002_initial.py @@ -0,0 +1,46 @@ +# Generated by Django 5.1.4 on 2024-12-31 15:26 + +import django.db.models.deletion +from django.conf import settings +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('payments', '0001_initial'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.AddField( + model_name='shoppingcart', + name='user', + field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), + ), + migrations.AddField( + model_name='cartitem', + name='cart', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='items', to='payments.shoppingcart'), + ), + migrations.AddField( + model_name='subscription', + name='user', + field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), + ), + migrations.AddField( + model_name='subscription', + name='plan', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='payments.subscriptionplan'), + ), + migrations.AlterUniqueTogether( + name='cartitem', + unique_together={('cart', 'resource')}, + ), + migrations.AddConstraint( + model_name='subscription', + constraint=models.UniqueConstraint(fields=('user', 'plan'), name='unique_user_plan'), + ), + ] |