From ad538d3a79c7f89891af79ed35ff1cee3eb9b2e6 Mon Sep 17 00:00:00 2001 From: andrepapoti Date: Mon, 18 Mar 2024 11:34:26 -0300 Subject: [PATCH] models: Add 'related_series' field to Series model Closes #506 Signed-off-by: andrepapoti --- .../migrations/0047_series_related_series.py | 17 +++++++++++++++++ patchwork/models.py | 1 + 2 files changed, 18 insertions(+) create mode 100644 patchwork/migrations/0047_series_related_series.py diff --git a/patchwork/migrations/0047_series_related_series.py b/patchwork/migrations/0047_series_related_series.py new file mode 100644 index 00000000..df8034c7 --- /dev/null +++ b/patchwork/migrations/0047_series_related_series.py @@ -0,0 +1,17 @@ +# Generated by Django 5.0.2 on 2024-03-14 16:20 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ('patchwork', '0046_patch_comment_events'), + ] + + operations = [ + migrations.AddField( + model_name='series', + name='related_series', + field=models.ManyToManyField(to='patchwork.series'), + ), + ] diff --git a/patchwork/models.py b/patchwork/models.py index 9a619bc5..da2f1674 100644 --- a/patchwork/models.py +++ b/patchwork/models.py @@ -848,6 +848,7 @@ class Series(FilenameMixin, models.Model): help_text='An optional name to associate with ' 'the series, e.g. "John\'s PCI series".', ) + related_series = models.ManyToManyField('self') date = models.DateTimeField() submitter = models.ForeignKey(Person, on_delete=models.CASCADE) version = models.IntegerField(