diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 9a3194b0e8..14e8ca5204 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -17,6 +17,10 @@ Unreleased ---------- * nothing unreleased +[4.27.0] +--------- +* chore: Add index to the username field in the `Consent` model + [4.26.1] --------- * feat: proxy login now redirects to LMS register page instead of login page diff --git a/consent/migrations/0007_datasharingconsent_consent_add_username_index.py b/consent/migrations/0007_datasharingconsent_consent_add_username_index.py new file mode 100644 index 0000000000..b20ca0172e --- /dev/null +++ b/consent/migrations/0007_datasharingconsent_consent_add_username_index.py @@ -0,0 +1,17 @@ +# Generated by Django 4.2.15 on 2024-10-07 14:33 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('consent', '0006_alter_historicaldatasharingconsent_options'), + ] + + operations = [ + migrations.AddIndex( + model_name='datasharingconsent', + index=models.Index(fields=['username'], name='consent_dat_usernam_fae23a_idx'), + ), + ] diff --git a/consent/models.py b/consent/models.py index abbbd2a72e..ea230da629 100644 --- a/consent/models.py +++ b/consent/models.py @@ -195,6 +195,9 @@ class Meta: abstract = True app_label = 'consent' + indexes = [ + models.Index(fields=['username']) + ] enterprise_customer = models.ForeignKey( EnterpriseCustomer, diff --git a/enterprise/__init__.py b/enterprise/__init__.py index 842d82f811..b15308fbf4 100644 --- a/enterprise/__init__.py +++ b/enterprise/__init__.py @@ -2,4 +2,4 @@ Your project description goes here. """ -__version__ = "4.26.1" +__version__ = "4.27.0"