Skip to content

Commit a3507be

Browse files
committed
Add blob_name to Appointments
We want to avoid reading an incoming data file of appointments twice - so we need to store some kind of reference to the original file the Appointment is from. We can then check whether an Appointment already exists from the file before saving it `create_appointments`
1 parent cd4f323 commit a3507be

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Generated by Django 5.2.3 on 2025-08-21 14:36
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('notifications', '0012_alter_message_batch_notify_errors'),
10+
]
11+
12+
operations = [
13+
migrations.AddField(
14+
model_name='appointment',
15+
name='blob_name',
16+
field=models.TextField(default='/'),
17+
preserve_default=False,
18+
),
19+
]

manage_breast_screening/notifications/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ class Appointment(models.Model):
126126
starts_at = models.DateTimeField(null=False)
127127
created_at = models.DateTimeField(null=False, auto_now_add=True)
128128
updated_at = models.DateTimeField(null=True, auto_now=True)
129+
blob_name = models.TextField(null=False)
129130

130131
clinic = models.ForeignKey("notifications.Clinic", on_delete=models.PROTECT)
131132

0 commit comments

Comments
 (0)