From 0019acc6c15823e2465dbdd1e9813ed0eec53588 Mon Sep 17 00:00:00 2001 From: Hironsan Date: Wed, 24 Nov 2021 15:05:50 +0900 Subject: [PATCH] Add a migration --- .../api/migrations/0019_auto_20211124_0506.py | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 backend/api/migrations/0019_auto_20211124_0506.py diff --git a/backend/api/migrations/0019_auto_20211124_0506.py b/backend/api/migrations/0019_auto_20211124_0506.py new file mode 100644 index 00000000..d8baa1bf --- /dev/null +++ b/backend/api/migrations/0019_auto_20211124_0506.py @@ -0,0 +1,30 @@ +# Generated by Django 3.2.8 on 2021-11-24 05:06 + +from django.db import migrations, models +import django.db.models.expressions + + +class Migration(migrations.Migration): + + dependencies = [ + ('api', '0018_alter_label_background_color'), + ] + + operations = [ + migrations.AlterUniqueTogether( + name='span', + unique_together=set(), + ), + migrations.AddConstraint( + model_name='span', + constraint=models.CheckConstraint(check=models.Q(('start_offset__gte', 0)), name='startOffset >= 0'), + ), + migrations.AddConstraint( + model_name='span', + constraint=models.CheckConstraint(check=models.Q(('end_offset__gte', 0)), name='endOffset >= 0'), + ), + migrations.AddConstraint( + model_name='span', + constraint=models.CheckConstraint(check=models.Q(('start_offset__lt', django.db.models.expressions.F('end_offset'))), name='start < end'), + ), + ]