agendas: add custom_fields on Event model (#63287)

This commit is contained in:
Lauréline Guérin 2022-04-05 09:44:53 +02:00
parent f2a1a97940
commit 4ceb16a8e1
No known key found for this signature in database
GPG Key ID: 1FAB9B9B4F93D473
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,17 @@
import django.contrib.postgres.fields.jsonb
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('agendas', '0116_events_type'),
]
operations = [
migrations.AddField(
model_name='event',
name='custom_fields',
field=django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=dict),
),
]

View File

@ -1428,6 +1428,7 @@ class Event(models.Model):
meeting_type = models.ForeignKey(MeetingType, null=True, on_delete=models.CASCADE)
desk = models.ForeignKey('Desk', null=True, on_delete=models.CASCADE)
resources = models.ManyToManyField('Resource')
custom_fields = JSONField(blank=True, default=dict)
almost_full_notification_timestamp = models.DateTimeField(null=True, blank=True)
full_notification_timestamp = models.DateTimeField(null=True, blank=True)