Skip to content

Commit

Permalink
added global default id
Browse files Browse the repository at this point in the history
  • Loading branch information
Tllew committed Jan 4, 2024
1 parent 93b4875 commit c4b2eaf
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 40 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,4 @@ mailserver/*

# pii file
.pii-secret-hook
.background-tasks-is-ready
2 changes: 2 additions & 0 deletions conf/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,3 +255,5 @@
AZURE_AUTH_TENANT_ID = env.str("AZURE_AUTH_TENANT_ID")

SEND_REJECTED_EMAIL = env.bool("SEND_REJECTED_EMAIL", default=True)

DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'

This file was deleted.

22 changes: 22 additions & 0 deletions mail/migrations/0022_alter_licencedata_licence_payloads.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated by Django 4.2.9 on 2024-01-04 14:24

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("mail", "0021_licencepayload_skip_process"),
]

operations = [
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",
),
),
]
3 changes: 0 additions & 3 deletions mail/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ 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)
Expand Down Expand Up @@ -193,14 +192,12 @@ 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)
Expand Down

0 comments on commit c4b2eaf

Please sign in to comment.