diff --git a/ietf/doc/migrations/0038_auto_20201109_0429.py b/ietf/doc/migrations/0038_auto_20201109_0429.py new file mode 100644 index 000000000..1335032b2 --- /dev/null +++ b/ietf/doc/migrations/0038_auto_20201109_0429.py @@ -0,0 +1,17 @@ +# Generated by Django 2.2.17 on 2020-11-09 04:29 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('doc', '0037_clean_up_missing_docaliases'), + ] + + operations = [ + migrations.AddIndex( + model_name='docevent', + index=models.Index(fields=['-time', '-id'], name='doc_doceven_time_1a258f_idx'), + ), + ] diff --git a/ietf/doc/migrations/0039_auto_20201109_0439.py b/ietf/doc/migrations/0039_auto_20201109_0439.py new file mode 100644 index 000000000..e6e336456 --- /dev/null +++ b/ietf/doc/migrations/0039_auto_20201109_0439.py @@ -0,0 +1,21 @@ +# Generated by Django 2.2.17 on 2020-11-09 04:39 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('doc', '0038_auto_20201109_0429'), + ] + + operations = [ + migrations.AddIndex( + model_name='dochistoryauthor', + index=models.Index(fields=['document', 'order'], name='doc_dochist_documen_7e2441_idx'), + ), + migrations.AddIndex( + model_name='documentauthor', + index=models.Index(fields=['document', 'order'], name='doc_documen_documen_7fabe2_idx'), + ), + ] diff --git a/ietf/doc/models.py b/ietf/doc/models.py index ffef531d7..10da3da18 100644 --- a/ietf/doc/models.py +++ b/ietf/doc/models.py @@ -618,6 +618,9 @@ class DocumentAuthorInfo(models.Model): class Meta: abstract = True ordering = ["document", "order"] + indexes = [ + models.Index(fields=['document', 'order']), + ] class DocumentAuthor(DocumentAuthorInfo): document = ForeignKey('Document') @@ -1076,6 +1079,7 @@ class DocEvent(models.Model): ordering = ['-time', '-id'] indexes = [ models.Index(fields=['type', 'doc']), + models.Index(fields=['-time', '-id']), ] class NewRevisionDocEvent(DocEvent): diff --git a/ietf/group/migrations/0038_auto_20201109_0439.py b/ietf/group/migrations/0038_auto_20201109_0439.py new file mode 100644 index 000000000..26bfd03ed --- /dev/null +++ b/ietf/group/migrations/0038_auto_20201109_0439.py @@ -0,0 +1,17 @@ +# Generated by Django 2.2.17 on 2020-11-09 04:39 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('group', '0037_initial_yc_roles'), + ] + + operations = [ + migrations.AddIndex( + model_name='groupevent', + index=models.Index(fields=['-time', '-id'], name='group_group_time_ee7c7c_idx'), + ), + ] diff --git a/ietf/group/models.py b/ietf/group/models.py index 5a0595c97..22c98a590 100644 --- a/ietf/group/models.py +++ b/ietf/group/models.py @@ -334,6 +334,9 @@ class GroupEvent(models.Model): class Meta: ordering = ['-time', 'id'] + indexes = [ + models.Index(fields=['-time', '-id']), + ] class ChangeStateGroupEvent(GroupEvent): state = ForeignKey(GroupStateName) diff --git a/ietf/iesg/models.py b/ietf/iesg/models.py index 1e15cf619..f3690d4c7 100644 --- a/ietf/iesg/models.py +++ b/ietf/iesg/models.py @@ -88,3 +88,6 @@ class TelechatDate(models.Model): class Meta: ordering = ['-date'] + indexes = [ + models.Index(fields=['-date',]), + ] diff --git a/ietf/ipr/migrations/0008_auto_20201109_0439.py b/ietf/ipr/migrations/0008_auto_20201109_0439.py new file mode 100644 index 000000000..d8140031c --- /dev/null +++ b/ietf/ipr/migrations/0008_auto_20201109_0439.py @@ -0,0 +1,21 @@ +# Generated by Django 2.2.17 on 2020-11-09 04:39 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('ipr', '0007_create_ipr_doc_events'), + ] + + operations = [ + migrations.AddIndex( + model_name='iprdisclosurebase', + index=models.Index(fields=['-time', '-id'], name='ipr_iprdisc_time_846a78_idx'), + ), + migrations.AddIndex( + model_name='iprevent', + index=models.Index(fields=['-time', '-id'], name='ipr_ipreven_time_9630c4_idx'), + ), + ] diff --git a/ietf/ipr/models.py b/ietf/ipr/models.py index 9a59eb44f..282f33568 100644 --- a/ietf/ipr/models.py +++ b/ietf/ipr/models.py @@ -30,6 +30,9 @@ class IprDisclosureBase(models.Model): class Meta: ordering = ['-time', '-id'] + indexes = [ + models.Index(fields=['-time', '-id']), + ] def __str__(self): return self.title @@ -247,6 +250,9 @@ class IprEvent(models.Model): class Meta: ordering = ['-time', '-id'] + indexes = [ + models.Index(fields=['-time', '-id']), + ] class LegacyMigrationIprEvent(IprEvent): """A subclass of IprEvent specifically for capturing contents of legacy_url_0, diff --git a/ietf/liaisons/migrations/0007_auto_20201109_0439.py b/ietf/liaisons/migrations/0007_auto_20201109_0439.py new file mode 100644 index 000000000..cd9aa967e --- /dev/null +++ b/ietf/liaisons/migrations/0007_auto_20201109_0439.py @@ -0,0 +1,17 @@ +# Generated by Django 2.2.17 on 2020-11-09 04:39 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('liaisons', '0006_document_primary_key_cleanup'), + ] + + operations = [ + migrations.AddIndex( + model_name='liaisonstatementevent', + index=models.Index(fields=['-time', '-id'], name='liaisons_li_time_3e1646_idx'), + ), + ] diff --git a/ietf/liaisons/models.py b/ietf/liaisons/models.py index 3053941d0..66d817606 100644 --- a/ietf/liaisons/models.py +++ b/ietf/liaisons/models.py @@ -238,3 +238,6 @@ class LiaisonStatementEvent(models.Model): class Meta: ordering = ['-time', '-id'] + indexes = [ + models.Index(fields=['-time', '-id']), + ] diff --git a/ietf/meeting/migrations/0039_auto_20201109_0439.py b/ietf/meeting/migrations/0039_auto_20201109_0439.py new file mode 100644 index 000000000..9790a158a --- /dev/null +++ b/ietf/meeting/migrations/0039_auto_20201109_0439.py @@ -0,0 +1,21 @@ +# Generated by Django 2.2.17 on 2020-11-09 04:39 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('meeting', '0038_auto_20201005_1123'), + ] + + operations = [ + migrations.AddIndex( + model_name='meeting', + index=models.Index(fields=['-date', '-id'], name='meeting_mee_date_40ca21_idx'), + ), + migrations.AddIndex( + model_name='timeslot', + index=models.Index(fields=['-time', '-id'], name='meeting_tim_time_b802cb_idx'), + ), + ] diff --git a/ietf/meeting/models.py b/ietf/meeting/models.py index dd3a976a7..a5a638207 100644 --- a/ietf/meeting/models.py +++ b/ietf/meeting/models.py @@ -312,6 +312,9 @@ class Meeting(models.Model): class Meta: ordering = ["-date", "-id"] + indexes = [ + models.Index(fields=['-date', '-id']), + ] # === Rooms, Resources, Floorplans ============================================= @@ -622,6 +625,9 @@ class TimeSlot(models.Model): class Meta: ordering = ["-time", "-id"] + indexes = [ + models.Index(fields=['-time', '-id']), + ] # end of TimeSlot diff --git a/ietf/message/migrations/0011_auto_20201109_0439.py b/ietf/message/migrations/0011_auto_20201109_0439.py new file mode 100644 index 000000000..5134592cf --- /dev/null +++ b/ietf/message/migrations/0011_auto_20201109_0439.py @@ -0,0 +1,21 @@ +# Generated by Django 2.2.17 on 2020-11-09 04:39 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('message', '0010_fix_content_type'), + ] + + operations = [ + migrations.AddIndex( + model_name='message', + index=models.Index(fields=['time'], name='message_mes_time_20eabf_idx'), + ), + migrations.AddIndex( + model_name='sendqueue', + index=models.Index(fields=['time'], name='message_sen_time_07ab31_idx'), + ), + ] diff --git a/ietf/message/models.py b/ietf/message/models.py index e139e4165..01162a4b6 100644 --- a/ietf/message/models.py +++ b/ietf/message/models.py @@ -37,6 +37,9 @@ class Message(models.Model): class Meta: ordering = ['time'] + indexes = [ + models.Index(fields=['time',]), + ] def __str__(self): return "'%s' %s -> %s" % (self.subject, self.frm, self.to) @@ -71,6 +74,9 @@ class SendQueue(models.Model): class Meta: ordering = ['time'] + indexes = [ + models.Index(fields=['time',]), + ] def __str__(self): return "'%s' %s -> %s (sent at %s)" % (self.message.subject, self.message.frm, self.message.to, self.sent_at or "") diff --git a/ietf/nomcom/migrations/0009_auto_20201109_0439.py b/ietf/nomcom/migrations/0009_auto_20201109_0439.py new file mode 100644 index 000000000..8b6efe2a8 --- /dev/null +++ b/ietf/nomcom/migrations/0009_auto_20201109_0439.py @@ -0,0 +1,17 @@ +# Generated by Django 2.2.17 on 2020-11-09 04:39 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('nomcom', '0008_auto_20201008_0506'), + ] + + operations = [ + migrations.AddIndex( + model_name='feedback', + index=models.Index(fields=['time'], name='nomcom_feed_time_35cf38_idx'), + ), + ] diff --git a/ietf/nomcom/models.py b/ietf/nomcom/models.py index fbdf1c616..439759838 100644 --- a/ietf/nomcom/models.py +++ b/ietf/nomcom/models.py @@ -296,6 +296,9 @@ class Feedback(models.Model): class Meta: ordering = ['time'] + indexes = [ + models.Index(fields=['time',]), + ] class FeedbackLastSeen(models.Model): reviewer = ForeignKey(Person) diff --git a/ietf/person/migrations/0018_auto_20201109_0439.py b/ietf/person/migrations/0018_auto_20201109_0439.py new file mode 100644 index 000000000..51f1d2d91 --- /dev/null +++ b/ietf/person/migrations/0018_auto_20201109_0439.py @@ -0,0 +1,17 @@ +# Generated by Django 2.2.17 on 2020-11-09 04:39 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('person', '0017_auto_20201028_0902'), + ] + + operations = [ + migrations.AddIndex( + model_name='personevent', + index=models.Index(fields=['-time', '-id'], name='person_pers_time_8dfbc5_idx'), + ), + ] diff --git a/ietf/person/models.py b/ietf/person/models.py index 12b8ce92c..8d1fb549d 100644 --- a/ietf/person/models.py +++ b/ietf/person/models.py @@ -415,6 +415,9 @@ class PersonEvent(models.Model): class Meta: ordering = ['-time', '-id'] + indexes = [ + models.Index(fields=['-time', '-id']), + ] class PersonApiKeyEvent(PersonEvent): key = ForeignKey(PersonalApiKey) diff --git a/ietf/submit/migrations/0007_auto_20201109_0439.py b/ietf/submit/migrations/0007_auto_20201109_0439.py new file mode 100644 index 000000000..c52f90539 --- /dev/null +++ b/ietf/submit/migrations/0007_auto_20201109_0439.py @@ -0,0 +1,17 @@ +# Generated by Django 2.2.17 on 2020-11-09 04:39 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('submit', '0006_submission_xml_version'), + ] + + operations = [ + migrations.AddIndex( + model_name='submissionevent', + index=models.Index(fields=['-time', '-id'], name='submit_subm_time_fcd790_idx'), + ), + ] diff --git a/ietf/submit/models.py b/ietf/submit/models.py index 4467c4b16..5dfb55863 100644 --- a/ietf/submit/models.py +++ b/ietf/submit/models.py @@ -107,6 +107,9 @@ class SubmissionEvent(models.Model): class Meta: ordering = ("-time", "-id") + indexes = [ + models.Index(fields=['-time', '-id']), + ] class Preapproval(models.Model):