diff --git a/twitch/migrations/0004_alter_dropbenefit_distribution_type.py b/twitch/migrations/0004_alter_dropbenefit_distribution_type.py new file mode 100644 index 0000000..00cebe2 --- /dev/null +++ b/twitch/migrations/0004_alter_dropbenefit_distribution_type.py @@ -0,0 +1,18 @@ +# Generated by Django 5.2.4 on 2025-08-03 22:14 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('twitch', '0003_alter_notificationsubscription_unique_together_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='dropbenefit', + name='distribution_type', + field=models.TextField(db_index=True), + ), + ] diff --git a/twitch/models.py b/twitch/models.py index c918141..407d865 100644 --- a/twitch/models.py +++ b/twitch/models.py @@ -123,18 +123,13 @@ class DropCampaign(models.Model): class DropBenefit(models.Model): """Represents a benefit that can be earned from a drop.""" - DISTRIBUTION_TYPES: ClassVar[list[tuple[str, str]]] = [ - ("DIRECT_ENTITLEMENT", "Direct Entitlement"), - ("CODE", "Code"), - ] - id = models.TextField(primary_key=True) name = models.TextField(db_index=True) image_asset_url = models.URLField(max_length=500, blank=True, default="") created_at = models.DateTimeField(db_index=True) entitlement_limit = models.PositiveIntegerField(default=1) is_ios_available = models.BooleanField(default=False) - distribution_type = models.TextField(choices=DISTRIBUTION_TYPES, db_index=True) + distribution_type = models.TextField(db_index=True) # Foreign keys game = models.ForeignKey(Game, on_delete=models.CASCADE, related_name="drop_benefits", db_index=True)