From eeaddb27560d723ca7d61359744ceb2709fccd2d Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Tue, 15 Oct 2024 21:01:31 +0100 Subject: Renamed from pyblackbird_cc to alphabetlearning - everywhere --- pyblackbird_cc/payments/migrations/0001_initial.py | 103 --------------------- .../migrations/0002_subscriptionplan_and_more.py | 36 ------- .../payments/migrations/0003_product_price.py | 53 ----------- ...name_stripe_product_id_price_stripe_price_id.py | 18 ---- .../0005_remove_subscriptionplan_stripe_plan_id.py | 17 ---- .../payments/migrations/0006_subscription_plan.py | 24 ----- .../0007_remove_cartitem_quantity_and_more.py | 23 ----- pyblackbird_cc/payments/migrations/__init__.py | 0 8 files changed, 274 deletions(-) delete mode 100644 pyblackbird_cc/payments/migrations/0001_initial.py delete mode 100644 pyblackbird_cc/payments/migrations/0002_subscriptionplan_and_more.py delete mode 100644 pyblackbird_cc/payments/migrations/0003_product_price.py delete mode 100644 pyblackbird_cc/payments/migrations/0004_rename_stripe_product_id_price_stripe_price_id.py delete mode 100644 pyblackbird_cc/payments/migrations/0005_remove_subscriptionplan_stripe_plan_id.py delete mode 100644 pyblackbird_cc/payments/migrations/0006_subscription_plan.py delete mode 100644 pyblackbird_cc/payments/migrations/0007_remove_cartitem_quantity_and_more.py delete mode 100644 pyblackbird_cc/payments/migrations/__init__.py (limited to 'pyblackbird_cc/payments/migrations') diff --git a/pyblackbird_cc/payments/migrations/0001_initial.py b/pyblackbird_cc/payments/migrations/0001_initial.py deleted file mode 100644 index 33b7602..0000000 --- a/pyblackbird_cc/payments/migrations/0001_initial.py +++ /dev/null @@ -1,103 +0,0 @@ -# Generated by Django 5.0.4 on 2024-09-03 19:21 - -import django.db.models.deletion -from django.conf import settings -from django.db import migrations, models - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ("resources", "0019_alter_pdfpagesnapshot_options_and_more"), - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ] - - operations = [ - migrations.CreateModel( - name="ShoppingCart", - fields=[ - ( - "id", - models.BigAutoField( - auto_created=True, - primary_key=True, - serialize=False, - verbose_name="ID", - ), - ), - ("created_at", models.DateTimeField(auto_now_add=True)), - ("updated_at", models.DateTimeField(auto_now=True)), - ( - "user", - models.OneToOneField( - on_delete=django.db.models.deletion.CASCADE, - to=settings.AUTH_USER_MODEL, - ), - ), - ], - ), - migrations.CreateModel( - name="Subscription", - fields=[ - ( - "id", - models.BigAutoField( - auto_created=True, - primary_key=True, - serialize=False, - verbose_name="ID", - ), - ), - ("is_active", models.BooleanField(default=False)), - ("start_date", models.DateTimeField(blank=True, null=True)), - ("end_date", models.DateTimeField(blank=True, null=True)), - ( - "stripe_subscription_id", - models.CharField(blank=True, max_length=255, null=True), - ), - ( - "user", - models.OneToOneField( - on_delete=django.db.models.deletion.CASCADE, - to=settings.AUTH_USER_MODEL, - ), - ), - ], - ), - migrations.CreateModel( - name="CartItem", - fields=[ - ( - "id", - models.BigAutoField( - auto_created=True, - primary_key=True, - serialize=False, - verbose_name="ID", - ), - ), - ("quantity", models.PositiveIntegerField(default=1)), - ("added_at", models.DateTimeField(auto_now_add=True)), - ( - "resource", - models.ForeignKey( - on_delete=django.db.models.deletion.CASCADE, - to="resources.resource", - ), - ), - ( - "cart", - models.ForeignKey( - on_delete=django.db.models.deletion.CASCADE, - related_name="items", - to="payments.shoppingcart", - ), - ), - ], - options={ - "unique_together": {("cart", "resource")}, - }, - ), - ] diff --git a/pyblackbird_cc/payments/migrations/0002_subscriptionplan_and_more.py b/pyblackbird_cc/payments/migrations/0002_subscriptionplan_and_more.py deleted file mode 100644 index cab49b5..0000000 --- a/pyblackbird_cc/payments/migrations/0002_subscriptionplan_and_more.py +++ /dev/null @@ -1,36 +0,0 @@ -# Generated by Django 5.0.4 on 2024-09-03 19:32 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ("payments", "0001_initial"), - ] - - operations = [ - migrations.CreateModel( - name="SubscriptionPlan", - fields=[ - ( - "id", - models.BigAutoField( - auto_created=True, - primary_key=True, - serialize=False, - verbose_name="ID", - ), - ), - ("name", models.CharField(max_length=255)), - ("price", models.DecimalField(decimal_places=2, max_digits=6)), - ("description", models.TextField()), - ("allowed_downloads", models.PositiveIntegerField()), - ("stripe_plan_id", models.CharField(max_length=255)), - ], - ), - migrations.RemoveField( - model_name="subscription", - name="stripe_subscription_id", - ), - ] diff --git a/pyblackbird_cc/payments/migrations/0003_product_price.py b/pyblackbird_cc/payments/migrations/0003_product_price.py deleted file mode 100644 index b12d5dc..0000000 --- a/pyblackbird_cc/payments/migrations/0003_product_price.py +++ /dev/null @@ -1,53 +0,0 @@ -# Generated by Django 5.0.4 on 2024-09-04 19:01 - -import django.db.models.deletion -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ("payments", "0002_subscriptionplan_and_more"), - ] - - operations = [ - migrations.CreateModel( - name="Product", - fields=[ - ( - "id", - models.BigAutoField( - auto_created=True, - primary_key=True, - serialize=False, - verbose_name="ID", - ), - ), - ("name", models.CharField(max_length=255)), - ("stripe_product_id", models.CharField(max_length=100)), - ], - ), - migrations.CreateModel( - name="Price", - fields=[ - ( - "id", - models.BigAutoField( - auto_created=True, - primary_key=True, - serialize=False, - verbose_name="ID", - ), - ), - ("price", models.IntegerField(default=0)), - ("stripe_product_id", models.CharField(max_length=100)), - ( - "product", - models.ForeignKey( - on_delete=django.db.models.deletion.CASCADE, - to="payments.product", - ), - ), - ], - ), - ] diff --git a/pyblackbird_cc/payments/migrations/0004_rename_stripe_product_id_price_stripe_price_id.py b/pyblackbird_cc/payments/migrations/0004_rename_stripe_product_id_price_stripe_price_id.py deleted file mode 100644 index e5a339f..0000000 --- a/pyblackbird_cc/payments/migrations/0004_rename_stripe_product_id_price_stripe_price_id.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 5.0.4 on 2024-09-04 19:17 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ("payments", "0003_product_price"), - ] - - operations = [ - migrations.RenameField( - model_name="price", - old_name="stripe_product_id", - new_name="stripe_price_id", - ), - ] 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 deleted file mode 100644 index 1e642b4..0000000 --- a/pyblackbird_cc/payments/migrations/0005_remove_subscriptionplan_stripe_plan_id.py +++ /dev/null @@ -1,17 +0,0 @@ -# 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 deleted file mode 100644 index f54b5f9..0000000 --- a/pyblackbird_cc/payments/migrations/0006_subscription_plan.py +++ /dev/null @@ -1,24 +0,0 @@ -# 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, - ), - ] diff --git a/pyblackbird_cc/payments/migrations/0007_remove_cartitem_quantity_and_more.py b/pyblackbird_cc/payments/migrations/0007_remove_cartitem_quantity_and_more.py deleted file mode 100644 index e976059..0000000 --- a/pyblackbird_cc/payments/migrations/0007_remove_cartitem_quantity_and_more.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 5.0.4 on 2024-09-14 14:40 - -from django.conf import settings -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('payments', '0006_subscription_plan'), - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ] - - operations = [ - migrations.RemoveField( - model_name='cartitem', - name='quantity', - ), - migrations.AddConstraint( - model_name='subscription', - constraint=models.UniqueConstraint(fields=('user', 'plan'), name='unique_user_plan'), - ), - ] diff --git a/pyblackbird_cc/payments/migrations/__init__.py b/pyblackbird_cc/payments/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 -- cgit v1.2.3