]> git.parisson.com Git - teleforma.git/commitdiff
Added index on webclasses
authorGael Le Mignot <gael@pilotsystems.net>
Fri, 10 Dec 2021 10:22:01 +0000 (11:22 +0100)
committerGael Le Mignot <gael@pilotsystems.net>
Fri, 10 Dec 2021 10:22:01 +0000 (11:22 +0100)
teleforma/webclass/migrations/0005_webclass_teleforma_w_status_03cc4b_idx.py [new file with mode: 0644]
teleforma/webclass/models.py

diff --git a/teleforma/webclass/migrations/0005_webclass_teleforma_w_status_03cc4b_idx.py b/teleforma/webclass/migrations/0005_webclass_teleforma_w_status_03cc4b_idx.py
new file mode 100644 (file)
index 0000000..e330e55
--- /dev/null
@@ -0,0 +1,17 @@
+# Generated by Django 3.2.3 on 2021-12-10 11:20
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('webclass', '0004_auto_20210616_1654'),
+    ]
+
+    operations = [
+        migrations.AddIndex(
+            model_name='webclass',
+            index=models.Index(fields=['status', 'period', 'course'], name='teleforma_w_status_03cc4b_idx'),
+        ),
+    ]
index a6567a27c669d065bef3da7c956f3af901e0e623..56337de65634d3fb5d95ee3583c171b37be5bf36 100644 (file)
@@ -157,6 +157,9 @@ class Webclass(models.Model):
         db_table = app_label + '_' + 'webclass'
         verbose_name = _('webclass')
         verbose_name_plural = _('webclass')
+        indexes = [
+            models.Index(fields=['status', 'period', 'course', ]),
+         ]
 
     def __str__(self):
         return "Webclass %d : %s" % (self.id, self.course.title)