From 41dd1a2694275cea693e259b49ab9ce3ccf144cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Hells=C3=A9n?= Date: Fri, 5 Sep 2025 00:56:27 +0200 Subject: [PATCH] Update ID fields in models to use 255 character length for Game, DropBenefit, and TimeBasedDrop --- ...r_dropbenefit_id_alter_game_id_and_more.py | 28 +++++++++++++++++++ twitch/models.py | 6 ++-- 2 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 twitch/migrations/0010_alter_dropbenefit_id_alter_game_id_and_more.py diff --git a/twitch/migrations/0010_alter_dropbenefit_id_alter_game_id_and_more.py b/twitch/migrations/0010_alter_dropbenefit_id_alter_game_id_and_more.py new file mode 100644 index 0000000..58f33eb --- /dev/null +++ b/twitch/migrations/0010_alter_dropbenefit_id_alter_game_id_and_more.py @@ -0,0 +1,28 @@ +# Generated by Django 5.2.5 on 2025-09-04 22:53 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('twitch', '0009_postgresql_optimizations_fixed'), + ] + + operations = [ + migrations.AlterField( + model_name='dropbenefit', + name='id', + field=models.CharField(help_text='Unique Twitch identifier for the benefit.', max_length=255, primary_key=True, serialize=False), + ), + migrations.AlterField( + model_name='game', + name='id', + field=models.CharField(max_length=255, primary_key=True, serialize=False, verbose_name='Game ID'), + ), + migrations.AlterField( + model_name='timebaseddrop', + name='id', + field=models.CharField(help_text='Unique Twitch identifier for the time-based drop.', max_length=255, primary_key=True, serialize=False), + ), + ] diff --git a/twitch/models.py b/twitch/models.py index 01679c3..38debb0 100644 --- a/twitch/models.py +++ b/twitch/models.py @@ -60,7 +60,7 @@ class Organization(models.Model): class Game(models.Model): """Represents a game on Twitch.""" - id = models.CharField(max_length=64, primary_key=True, verbose_name="Game ID") + id = models.CharField(max_length=255, primary_key=True, verbose_name="Game ID") slug = models.CharField( max_length=200, blank=True, @@ -290,7 +290,7 @@ class DropBenefit(models.Model): """Represents a benefit that can be earned from a drop.""" id = models.CharField( - max_length=64, + max_length=255, primary_key=True, help_text="Unique Twitch identifier for the benefit.", ) @@ -360,7 +360,7 @@ class TimeBasedDrop(models.Model): """Represents a time-based drop in a drop campaign.""" id = models.CharField( - max_length=64, + max_length=255, primary_key=True, help_text="Unique Twitch identifier for the time-based drop.", )