Skip to content
Snippets Groups Projects
Commit 4d971c21 authored by Manon Blanco's avatar Manon Blanco Committed by Manon Blanco
Browse files

Add typeof=object constraint

parent f63a90f4
No related branches found
No related tags found
No related merge requests found
# Generated by Django 3.2.5 on 2021-11-02 11:16
# Generated by Django 3.2.5 on 2021-11-04 09:42
import uuid
......@@ -54,6 +54,10 @@ class Migration(migrations.Migration):
name='configuration',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='worker_runs', to='dataimport.workerconfiguration'),
),
migrations.AddConstraint(
model_name='workerconfiguration',
constraint=models.CheckConstraint(check=models.Q(('configuration__typeof', 'object')), name='worker_configuration_configuration_objects'),
),
migrations.AlterUniqueTogether(
name='workerconfiguration',
unique_together={('worker', 'name'), ('worker', 'configuration_hash')},
......
......@@ -616,6 +616,12 @@ class WorkerConfiguration(IndexableModel):
('worker', 'configuration_hash'),
('worker', 'name')
)
constraints = [
models.CheckConstraint(
check=models.Q(configuration__typeof='object'),
name='worker_configuration_configuration_objects',
)
]
class WorkerRun(models.Model):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment