diff options
author | Matthew Lemon <y@yulqen.org> | 2024-09-09 08:57:00 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-09-09 08:57:00 +0100 |
commit | 31966b6cbef88006056db44448cdaf59ba40533e (patch) | |
tree | 4ef34346feb14d689e3bb0c3a1b6098d30936077 /pyblackbird_cc/payments/migrations | |
parent | 63461fb0b86a8f4a1422673626311d0979cd1077 (diff) |
Test passing: signal sent on sign-up to create subscription
- user signs up
- signal sent which creates Subscription based on SubscriptionPlan allowing 10 downloads initially. Plan lasts 365 days at present
Diffstat (limited to 'pyblackbird_cc/payments/migrations')
-rw-r--r-- | pyblackbird_cc/payments/migrations/0005_remove_subscriptionplan_stripe_plan_id.py | 17 | ||||
-rw-r--r-- | pyblackbird_cc/payments/migrations/0006_subscription_plan.py | 24 |
2 files changed, 41 insertions, 0 deletions
diff --git a/pyblackbird_cc/payments/migrations/0005_remove_subscriptionplan_stripe_plan_id.py b/pyblackbird_cc/payments/migrations/0005_remove_subscriptionplan_stripe_plan_id.py new file mode 100644 index 0000000..1e642b4 --- /dev/null +++ b/pyblackbird_cc/payments/migrations/0005_remove_subscriptionplan_stripe_plan_id.py @@ -0,0 +1,17 @@ +# Generated by Django 5.0.4 on 2024-09-08 19:23 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ("payments", "0004_rename_stripe_product_id_price_stripe_price_id"), + ] + + operations = [ + migrations.RemoveField( + model_name="subscriptionplan", + name="stripe_plan_id", + ), + ] diff --git a/pyblackbird_cc/payments/migrations/0006_subscription_plan.py b/pyblackbird_cc/payments/migrations/0006_subscription_plan.py new file mode 100644 index 0000000..f54b5f9 --- /dev/null +++ b/pyblackbird_cc/payments/migrations/0006_subscription_plan.py @@ -0,0 +1,24 @@ +# Generated by Django 5.0.4 on 2024-09-08 20:21 + +import django.db.models.deletion +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("payments", "0005_remove_subscriptionplan_stripe_plan_id"), + ] + + operations = [ + migrations.AddField( + model_name="subscription", + name="plan", + field=models.ForeignKey( + default=1, + on_delete=django.db.models.deletion.CASCADE, + to="payments.subscriptionplan", + ), + preserve_default=False, + ), + ] |