From 93b4875ec3eab2f48deb80e0525ff99ee57866a1 Mon Sep 17 00:00:00 2001 From: Tomos Williams Date: Thu, 4 Jan 2024 11:03:01 +0000 Subject: [PATCH] updated model --- ...apping_id_alter_licencedata_id_and_more.py | 37 +++++++++++++++++++ mail/models.py | 3 ++ 2 files changed, 40 insertions(+) create mode 100644 mail/migrations/0022_alter_goodidmapping_id_alter_licencedata_id_and_more.py diff --git a/mail/migrations/0022_alter_goodidmapping_id_alter_licencedata_id_and_more.py b/mail/migrations/0022_alter_goodidmapping_id_alter_licencedata_id_and_more.py new file mode 100644 index 00000000..fa639a65 --- /dev/null +++ b/mail/migrations/0022_alter_goodidmapping_id_alter_licencedata_id_and_more.py @@ -0,0 +1,37 @@ +# Generated by Django 4.2.9 on 2024-01-04 10:55 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("mail", "0021_licencepayload_skip_process"), + ] + + operations = [ + migrations.AlterField( + model_name="goodidmapping", + name="id", + field=models.AutoField(primary_key=True, serialize=False), + ), + migrations.AlterField( + model_name="licencedata", + name="id", + field=models.AutoField(primary_key=True, serialize=False), + ), + migrations.AlterField( + model_name="licencedata", + name="licence_payloads", + field=models.ManyToManyField( + help_text="LicencePayload records linked to this LicenceData instance", + related_name="+", + to="mail.licencepayload", + ), + ), + migrations.AlterField( + model_name="transactionmapping", + name="id", + field=models.AutoField(primary_key=True, serialize=False), + ), + ] diff --git a/mail/models.py b/mail/models.py index c2de8a7c..6bd2b56a 100644 --- a/mail/models.py +++ b/mail/models.py @@ -100,6 +100,7 @@ def notify_users(id, response_date): class LicenceData(models.Model): + id = models.AutoField(primary_key=True) licence_ids = models.TextField() hmrc_run_number = models.IntegerField() source_run_number = models.IntegerField(null=True) @@ -192,12 +193,14 @@ class OrganisationIdMapping(models.Model): class GoodIdMapping(models.Model): + id = models.AutoField(primary_key=True) lite_id = models.UUIDField(primary_key=False, null=False, blank=False, unique=False) licence_reference = models.CharField(null=False, blank=False, max_length=35, unique=False) line_number = models.PositiveIntegerField() class TransactionMapping(models.Model): + id = models.AutoField(primary_key=True) licence_reference = models.CharField(null=False, blank=False, max_length=35, unique=False) line_number = models.PositiveIntegerField(null=True, blank=True) usage_transaction = models.CharField(null=False, blank=False, max_length=35)