diff --git a/infoscreen/migrations/0008_auto_20220801_2213.py b/infoscreen/migrations/0008_auto_20220801_2213.py new file mode 100644 index 0000000..f1d3763 --- /dev/null +++ b/infoscreen/migrations/0008_auto_20220801_2213.py @@ -0,0 +1,28 @@ +# Generated by Django 3.2.14 on 2022-08-01 19:13 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("infoscreen", "0007_lunchitem"), + ] + + operations = [ + migrations.AlterField( + model_name="infoinstance", + name="id", + field=models.AutoField(primary_key=True, serialize=False), + ), + migrations.AlterField( + model_name="infoitem", + name="id", + field=models.AutoField(primary_key=True, serialize=False), + ), + migrations.AlterField( + model_name="rotation", + name="id", + field=models.AutoField(primary_key=True, serialize=False), + ), + ] diff --git a/infoscreen/models.py b/infoscreen/models.py index 2610f23..d879fdc 100644 --- a/infoscreen/models.py +++ b/infoscreen/models.py @@ -16,6 +16,7 @@ class InfoItem(models.Model): class __meta__: abstract = True + id = models.AutoField(primary_key=True) name = models.CharField(max_length=255) # expire_date = None means never expiring item expire_date = models.DateTimeField(blank=True, null=True) @@ -316,6 +317,7 @@ class ExternalImageInfoItem(InfoItem): class InfoInstance(models.Model): """Class for Info instance in Infoscreen.""" + id = models.AutoField(primary_key=True) rotation = models.ForeignKey( "Rotation", related_name="instances", on_delete=models.CASCADE ) @@ -356,6 +358,7 @@ class InfoInstance(models.Model): class Rotation(models.Model): """Class for rotation model.""" + id = models.AutoField(primary_key=True) name = models.CharField(max_length=255) def get_dict(self): @@ -388,6 +391,7 @@ class Rotation(models.Model): class ImageUploadForm(forms.Form): """Form used to handle imageuploads to infoscreen app.""" + id = models.AutoField(primary_key=True) name = forms.CharField() image = forms.ImageField() @@ -395,5 +399,6 @@ class ImageUploadForm(forms.Form): class UploadFileForm(forms.Form): """Form used for uploading file.""" + id = models.AutoField(primary_key=True) name = forms.CharField() video = forms.FileField() diff --git a/kaehmy/migrations/0007_alter_commentparent_id.py b/kaehmy/migrations/0007_alter_commentparent_id.py new file mode 100644 index 0000000..bd7aca8 --- /dev/null +++ b/kaehmy/migrations/0007_alter_commentparent_id.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.14 on 2022-08-01 19:13 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("kaehmy", "0006_delete_telegramchannel"), + ] + + operations = [ + migrations.AlterField( + model_name="commentparent", + name="id", + field=models.AutoField(primary_key=True, serialize=False), + ), + ] diff --git a/kaehmy/models.py b/kaehmy/models.py index 6582a63..a3a033a 100644 --- a/kaehmy/models.py +++ b/kaehmy/models.py @@ -56,6 +56,7 @@ class CustomRole(KaehmyBaseRole): class CommentParent(models.Model): + id = models.AutoField(primary_key=True) name = models.CharField(_("Name"), max_length=255, default="") email = models.EmailField(_("Email"), default="") timestamp = models.DateTimeField(_("Timestamp"), default=timezone.now) diff --git a/members/migrations/0020_alter_payment_id.py b/members/migrations/0020_alter_payment_id.py new file mode 100644 index 0000000..eb957b4 --- /dev/null +++ b/members/migrations/0020_alter_payment_id.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.14 on 2022-08-01 19:13 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("members", "0019_auto_20171029_1143"), + ] + + operations = [ + migrations.AlterField( + model_name="payment", + name="id", + field=models.AutoField(primary_key=True, serialize=False), + ), + ] diff --git a/members/migrations/0021_auto_20220801_2215.py b/members/migrations/0021_auto_20220801_2215.py new file mode 100644 index 0000000..ff9bcae --- /dev/null +++ b/members/migrations/0021_auto_20220801_2215.py @@ -0,0 +1,23 @@ +# Generated by Django 3.2.14 on 2022-08-01 19:15 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("members", "0020_alter_payment_id"), + ] + + operations = [ + migrations.AlterField( + model_name="member", + name="id", + field=models.AutoField(primary_key=True, serialize=False), + ), + migrations.AlterField( + model_name="request", + name="id", + field=models.AutoField(primary_key=True, serialize=False), + ), + ] diff --git a/members/models.py b/members/models.py index e735dd4..d7f62e6 100644 --- a/members/models.py +++ b/members/models.py @@ -9,6 +9,7 @@ from django.db.models import Q, OuterRef, Subquery class BaseMember(models.Model): """Abstract base model for member.""" + id = models.AutoField(primary_key=True) first_name = models.CharField(_("First name"), max_length=127) last_name = models.CharField(_("Last name"), max_length=127) email = models.EmailField(_("Email"), unique=True) @@ -60,6 +61,7 @@ class Payment(models.Model): class Meta: permissions = (("read_payment", "Can see payment in list"),) + id = models.AutoField(primary_key=True) date = models.DateTimeField(_("Date"), default=timezone.now) source = models.CharField( _("Source"), diff --git a/ohlhafv/migrations/0003_alter_ohlhafvchallenge_id.py b/ohlhafv/migrations/0003_alter_ohlhafvchallenge_id.py new file mode 100644 index 0000000..6ff7fdf --- /dev/null +++ b/ohlhafv/migrations/0003_alter_ohlhafvchallenge_id.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.14 on 2022-08-01 19:13 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("ohlhafv", "0002_remove_ohlhafvchallenge_challenger_email"), + ] + + operations = [ + migrations.AlterField( + model_name="ohlhafvchallenge", + name="id", + field=models.AutoField(primary_key=True, serialize=False), + ), + ] diff --git a/ohlhafv/models.py b/ohlhafv/models.py index ed53131..249c5fc 100644 --- a/ohlhafv/models.py +++ b/ohlhafv/models.py @@ -29,6 +29,7 @@ class OhlhafvChallenge(models.Model): ("Team", _("Team Challenge (1 x 0.33 L, 2 x 0.5 L, 1 x 1.0 L)")), ) + id = models.AutoField(primary_key=True) challenger = models.CharField(_("Challenger"), max_length=255) victim = models.CharField(_("Victim"), max_length=255) victim_email = models.EmailField(_("Victim email")) diff --git a/webapp/migrations/0080_auto_20220801_2213.py b/webapp/migrations/0080_auto_20220801_2213.py new file mode 100644 index 0000000..82c6199 --- /dev/null +++ b/webapp/migrations/0080_auto_20220801_2213.py @@ -0,0 +1,48 @@ +# Generated by Django 3.2.14 on 2022-08-01 19:13 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("webapp", "0079_auto_20220113_2330"), + ] + + operations = [ + migrations.AlterField( + model_name="basefeed", + name="id", + field=models.AutoField(primary_key=True, serialize=False), + ), + migrations.AlterField( + model_name="basewebhook", + name="id", + field=models.AutoField(primary_key=True, serialize=False), + ), + migrations.AlterField( + model_name="jobad", + name="id", + field=models.AutoField(primary_key=True, serialize=False), + ), + migrations.AlterField( + model_name="signup", + name="id", + field=models.AutoField(primary_key=True, serialize=False), + ), + migrations.AlterField( + model_name="signupform", + name="id", + field=models.AutoField(primary_key=True, serialize=False), + ), + migrations.AlterField( + model_name="tag", + name="id", + field=models.AutoField(primary_key=True, serialize=False), + ), + migrations.AlterField( + model_name="templatequestion", + name="id", + field=models.AutoField(primary_key=True, serialize=False), + ), + ] diff --git a/webapp/models.py b/webapp/models.py index 5d077c5..2622ebf 100644 --- a/webapp/models.py +++ b/webapp/models.py @@ -28,6 +28,7 @@ class Tag(models.Model): verbose_name = _("Tag") verbose_name_plural = _("Tags") + id = models.AutoField(primary_key=True) slug = models.SlugField(unique=True) name = models.CharField(max_length=127) icon = models.ImageField() @@ -39,6 +40,7 @@ class Tag(models.Model): class BaseFeed(models.Model): """Model containing something showing on some info feed.""" + id = models.AutoField(primary_key=True) tags = models.ManyToManyField(Tag, related_name="feeds", blank=True) visible = models.BooleanField(default=True) title = models.CharField(max_length=255) @@ -133,6 +135,7 @@ class TemplateQuestion(models.Model): verbose_name = _("Template question") verbose_name_plural = _("Template questions") + id = models.AutoField(primary_key=True) name = models.CharField(max_length=255) questions = JSONField() deleted = models.BooleanField(default=False) @@ -148,6 +151,7 @@ class SignupForm(models.Model): verbose_name = _("Signup form") verbose_name_plural = _("Signup forms") + id = models.AutoField(primary_key=True) title = models.CharField(max_length=255) start_time = models.DateTimeField(default=timezone.now) end_time = models.DateTimeField(default=timezone.now) @@ -181,6 +185,7 @@ class Signup(models.Model): verbose_name = _("Sign-up") verbose_name_plural = _("Sign-ups") + id = models.AutoField(primary_key=True) signupForm = models.ForeignKey("SignupForm", on_delete=models.CASCADE) time = models.DateTimeField(default=timezone.now) answer = JSONField() @@ -220,6 +225,7 @@ def email_on_signup(sender, instance, created, **kwargs): class BaseRole(models.Model): """Base model for occupations/roles.""" + id = models.AutoField(primary_key=True) name = models.CharField(_("Name"), max_length=255) is_board = models.BooleanField(_("Board member")) @@ -235,6 +241,7 @@ class JobAd(models.Model): verbose_name = _("JobAd") verbose_name_plural = _("JobAds") + id = models.AutoField(primary_key=True) title = models.CharField(max_length=255) description = models.CharField(max_length=255) content = models.TextField() @@ -287,6 +294,7 @@ def processHooks(message: str, eventType: str): class BaseWebhook(PolymorphicModel): """Webhook base class instance""" + id = models.AutoField(primary_key=True) name = models.CharField(max_length=255) url = ( models.URLField()